<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Ahmed Elsherif on Medium]]></title>
        <description><![CDATA[Stories by Ahmed Elsherif on Medium]]></description>
        <link>https://medium.com/@elsherifx00?source=rss-bf59e9cfff8c------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*79zOQO0NLhrSnRc9Ohbtmw.jpeg</url>
            <title>Stories by Ahmed Elsherif on Medium</title>
            <link>https://medium.com/@elsherifx00?source=rss-bf59e9cfff8c------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 28 Nov 2026 21:47:27 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@elsherifx00/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 Can You get subdomain takeover on Vercel service ?]]></title>
            <link>https://medium.com/@elsherifx00/how-can-you-get-subdomain-takeover-on-vercel-service-1addd0621a9c?source=rss-bf59e9cfff8c------2</link>
            <guid isPermaLink="false">https://medium.com/p/1addd0621a9c</guid>
            <dc:creator><![CDATA[Ahmed Elsherif]]></dc:creator>
            <pubDate>Wed, 04 Sep 2024 03:20:48 GMT</pubDate>
            <atom:updated>2024-09-04T03:37:11.107Z</atom:updated>
            <content:encoded><![CDATA[<h3>How Can You get subdomain takeover on Vercel service ?</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*_tuqMUX80vtF_g1d" /></figure><p>During Pentesting engagement at <a href="https://medium.com/u/d764844684c5">CyberAR</a>, I discovered a Subdomain takeover on Vercel service, So in this Write-up, We will know how I reached that ?</p><p>Are you ready ?!<br>So let’s get started</p><h4>First What is Vercel ?</h4><p>Vercel is a cloud platform that allows developers to deploy and manage web applications with ease. It’s particularly popular for its seamless integration with frameworks like Next.js, enabling serverless functions, automatic scaling, and edge deployments. Vercel focuses on speed and simplicity, making it ideal for frontend developers looking to quickly deploy high-performance web applications.</p><p>So let’s Get into our approach</p><p>let’s say our target is <strong><em>example.com</em></strong></p><p>During my investigation I found that there is a subdomain gives <strong><em>404 status code</em></strong> with this message in the page</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6zqj6TxXzu8Xd6FhfJZmfg.png" /></figure><p>Usually when I saw 404, I think about subdomain takeover directly</p><p>So I used <strong><em>wappalyzer </em></strong>extension in browser to know Which service this subdomain use ?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YsVEe3L9Z-3uPx5uz7inrA.png" /><figcaption>Discover our target uses Vercel service</figcaption></figure><p>I found that the service is <strong>Vercel</strong></p><p>So I went to <a href="https://vercel.com/">https://vercel.com/</a> and made an account</p><p>After login to your account you will find this page</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*98rmuW5gFNShv6GHWSyf7A.png" /></figure><p>Click on browse Templates and choose a template</p><p><strong>Watch out!</strong></p><blockquote><strong>Choose a simple template to make it easy for you when you modify it</strong></blockquote><p>Easy frameworks like <strong><em>Flask Hello world</em></strong>, <strong><em>Python Hello world</em></strong>, <strong><em>Django Hello world</em></strong> or any framework you want</p><p>After choosing the framework .. Deploy it</p><p>Let’s say we choose Django Hello world for example</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DYrpAmcdXUNybJLf4uMzcQ.png" /></figure><p>We click on the main to go to framework github page</p><p>and search for where <strong><em>Hello from Vercel!</em></strong> is printed</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/899/1*l4it6vZwBqggHMCyzk4fwg.png" /><figcaption>Hello from Vercel!</figcaption></figure><p>so we go to <strong><em>example/views.py</em></strong> and modify it with what we want like</p><blockquote><strong>This page is Takeover by CyberAR</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/652/1*hvtPjaV53rWOsCbia_wkqw.png" /><figcaption>sub-takeover POC</figcaption></figure><p>After that we go to domains to add our vulnerable subdomain</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OXTLA6hov1xSA4OWUILJ-w.png" /></figure><p>and Finally We did it</p><p>Now we make subdomain takeover</p><h4>Note</h4><blockquote><strong>Vercel is an edge case which means not every 404 that uses Vercel service is vulnerable to subdomain takeover</strong></blockquote><h4>References</h4><ul><li><a href="https://github.com/EdOverflow/can-i-take-over-xyz">https://github.com/EdOverflow/can-i-take-over-xyz</a></li><li><a href="https://book.hacktricks.xyz/pentesting-web/domain-subdomain-takeover">https://book.hacktricks.xyz/pentesting-web/domain-subdomain-takeover</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1addd0621a9c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[AWS in security for Dummies]]></title>
            <link>https://medium.com/@elsherifx00/aws-in-security-for-dummies-3d3fc9827fee?source=rss-bf59e9cfff8c------2</link>
            <guid isPermaLink="false">https://medium.com/p/3d3fc9827fee</guid>
            <category><![CDATA[aws-s3]]></category>
            <category><![CDATA[security-services]]></category>
            <category><![CDATA[aws-security]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[security]]></category>
            <dc:creator><![CDATA[Ahmed Elsherif]]></dc:creator>
            <pubDate>Fri, 13 Jan 2023 19:14:35 GMT</pubDate>
            <atom:updated>2023-01-13T19:14:35.451Z</atom:updated>
            <content:encoded><![CDATA[<h3>What is AWS?</h3><p>Amazon Web Services (AWS) is a collection of remote computing services (also called web services) that make up a cloud computing platform, offered by Amazon.com. These services operate from 12 geographical regions across the world. One of the services that AWS offers is security-related services, which are designed to help customers secure their data and applications in the cloud.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*KMgEfq9W70VQg-oe.png" /><figcaption>AWS</figcaption></figure><h3>Security services that AWS can provide</h3><ul><li>AWS Identity and Access Management (IAM) is a service that enables you to create and manage users and groups, and use permissions to allow and deny access to AWS resources.</li><li>Amazon Virtual Private Cloud (VPC) allows you to create a virtual network in the AWS cloud — no VPNs, hardware, or physical datacenters required.</li><li>AWS Key Management Service (KMS) enables you to easily create and control the encryption keys used to encrypt your data.</li><li>Amazon CloudWatch is a monitoring service for AWS resources and the applications you run on AWS. With CloudWatch, you can collect and track metrics, collect and monitor log files, and set alarms.</li><li>Amazon Elastic Kubernetes Service (EKS) — a managed service that makes it easy for you to run Kubernetes on AWS without needing to stand up or maintain your own Kubernetes control plane.</li><li>AWS Certificate Manager (ACM) is a service that lets you easily provision, manage, and deploy Secure Sockets Layer/Transport Layer Security (SSL/TLS) certificates for use with AWS services.</li><li>AWS Web Application Firewall (WAF) is a service that helps protect your web applications from common web exploits that could affect application availability, compromise security, or consume excessive resources.</li><li>Amazon Simple Storage Service (S3) — an object storage service that offers industry-leading scalability, data availability, security, and performance.</li><li>Amazon Relational Database Service (RDS) — a managed relational database service that makes it easy to set up, operate, and scale a relational database in the cloud.</li><li>Amazon Elastic Block Store (EBS) — a block storage service that provides persistent storage for Amazon EC2 instances.</li><li>AWS Shield is a service that provides automatic protection against Distributed Denial of Service (DDoS) attacks.</li><li>Amazon Simple Queue Service (SQS) — a fully managed message queuing service that enables you to decouple and scale microservices, distributed systems, and serverless applications.</li><li>AWS Lambda — a serverless compute service that lets you run code without provisioning or managing servers.</li></ul><p>AWS provides a strong foundation to build a secure infrastructure, however it’s always the responsability of the customer to properly use the services and configure them properly to reach the desired level of security.</p><p>AWS also offers several other security and compliance services, including AWS Security Hub, which is a security management service that enables you to centrally monitor and manage security across your AWS accounts, AWS Config, which is a service that enables you to assess, audit, and evaluate the configurations of your AWS resources and AWS Artifact that provides on-demand access to AWS compliance reports.</p><p>These are just a few examples of the many services available on AWS. The platform also includes services for analytics, Internet of Things, security, mobile, developer tools, management tools, and more.</p><p>#AWS<br>#Security</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3d3fc9827fee" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to test for JWT attacks?]]></title>
            <link>https://systemweakness.com/how-to-test-for-jwt-attacks-513da89abe94?source=rss-bf59e9cfff8c------2</link>
            <guid isPermaLink="false">https://medium.com/p/513da89abe94</guid>
            <category><![CDATA[jwt]]></category>
            <category><![CDATA[authentication]]></category>
            <category><![CDATA[web-security]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[bug-bounty]]></category>
            <dc:creator><![CDATA[Ahmed Elsherif]]></dc:creator>
            <pubDate>Mon, 26 Dec 2022 15:56:49 GMT</pubDate>
            <atom:updated>2022-12-30T21:09:41.063Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/proxy/0*F5QdYDpH6rXWnsVF.jpeg" /><figcaption>JWT</figcaption></figure><p>Hi everyone in this blog I will try to summarize JWT attacks</p><p>We have 3 main solid points we will talk about <br><strong>- What are JWTs?<br>- What are JWT attacks?<br>- Scenarios about JWT attacks</strong></p><p>Let’s get started !!</p><h3><strong>- What </strong>are JWTs <strong>?</strong></h3><p>JSON web tokens (JWTs) are a standardized format for sending cryptographically signed JSON data between systems. Unlike with classic session tokens, all of the data that a server needs is stored client-side within the JWT itself.<br>A JWT consists of 3 parts: a <strong>header</strong>, a <strong>payload</strong>, and a <strong>signature</strong>. These are each separated by a dot. xxxxx.yyyyy.zzzzz</p><p>The <strong>header </strong>and <strong>payload </strong>parts of a JWT are just <strong>base64url-encoded</strong> JSON objects. In most cases, The data of header &amp; payload can be easily read or modified by anyone with access to the token. Therefore, the security of any JWT-based mechanism is heavily reliant on the cryptographic <strong>signature</strong>.<br>To create the signature part you have to take <strong><em>the encoded header</em></strong><em>, </em><strong><em>the encoded payload</em></strong><em>, </em><strong><em>a secret</em></strong><em>, </em><strong><em>the algorithm specified in the header</em></strong><em>, and </em><strong><em>sign that</em></strong><em>.</em></p><h3><strong>- What are JWT attacks?</strong></h3><p>JWT attacks involve a user sending modified JWTs to the server in order to achieve a malicious goal.</p><h3><strong>- Scenarios about JWT attacks</strong></h3><p>To summarize the idea we have one goal is to play with the signature. we can play with the signature via playing with the content of the signature (payload — “alg” of the header — header — secret — sign all of the mentioned). we have 7 scenarios in this blog &amp; I’ll use the JWT Editor extension, to know more about it from <a href="https://portswigger.net/web-security/jwt/working-with-jwts-in-burp-suite">here</a></p><ul><li><strong><em>The first scenario: (play with the payload only)</em></strong></li></ul><blockquote>Test for <strong><em>signature verification </em></strong>like changing <em>username value to administrator</em></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/721/1*bm9-tam5hD6f2L4wiMkJhg.png" /><figcaption>image for <em>The first scenario</em></figcaption></figure><ul><li><strong><em>the second scenario: (play with the payload &amp; “alg” )</em></strong></li></ul><blockquote>Test for <strong><em>Accepting tokens with no signature </em></strong>via changing <em>the “alg” value to none &amp; remove the signature</em></blockquote><pre>{<br>    &quot;alg&quot;: &quot;none&quot;,<br>    &quot;typ&quot;: &quot;JWT&quot;<br>}</pre><ul><li><strong><em>The third scenario:</em></strong> (play with the secret key)</li></ul><blockquote>Test for <strong><em>Brute-forcing secret keys using hashcat</em></strong> then <em>use the output &amp; encode it</em> &amp; click <em>New Symmetric Key and </em>Replace the generated value for the k property with the Base64-encoded secret.</blockquote><pre>hashcat -a 0 -m 16500 &lt;jwt&gt; &lt;wordlist&gt;</pre><ul><li><strong><em>The forth scenario: (play with the sign flow)</em></strong></li></ul><blockquote>Test for <strong><em>Injecting self-signed JWTs via the </em></strong>jwk<strong><em>parameter</em></strong> via click <em>New RSA Key </em>&amp; Generate jwkthen <em>attack with Embedded JWK</em></blockquote><ul><li><strong><em>The fifth scenario: (play with the header via external server)</em></strong></li></ul><p>Test for <strong><em>Injecting self-signed JWTs via the jku parameter</em></strong> via click <em>New RSA Key &amp; </em>Generate jwk then <em>Copy Public Key as JWK</em> &amp; <em>paste it in external server body</em> as below</p><pre>{<br>    &quot;keys&quot;: [<br><br>    ]<br>}</pre><p><em>replace the current value </em>of the kidparameter with the kid of the JWK that you uploaded to the exploit server &amp; Add a new jkuparameter to the header of the JWT. <em>Set its value to the URL of your </em>jwk<em>Set on the exploit server.</em></p><ul><li><strong><em>The sixth scenario:</em></strong></li></ul><blockquote>Test for <strong>Injecting self-signed JWTs via the kid parameter </strong>via click <em>New Symmetric Key</em> &amp; <em>Replace the generated value for the </em>k<em> property with a Base64-encoded null byte (AA==).</em>In the header of the JWT, change the value of the kidparameter to a path traversal sequence pointing to the /dev/null file: ../../../../../../../dev/null</blockquote><ul><li>The seventh scenario:</li></ul><blockquote>Test for <strong>Performing an algorithm confusion attack</strong><em> </em>via go to /jwks.json or /.well-known/jwks.json then <em>Copy the JWK object</em> from inside the keys array. Make sure that you don’t accidentally copy any characters from the surrounding array. then click <em>New RSA Key &amp; paste the JWK that you just copied. then Copy Public Key as PEM</em> then Use the <em>Decoder </em>tab to Base64 encode this PEM key, then copy the resulting string then Click <em>New Symmetric Key</em> &amp; <em>Replace the generated value for the k property with a Base64-encoded PEM that you just created</em></blockquote><h3>Resources</h3><ul><li><a href="https://portswigger.net/web-security/jwt">JWT attacks</a></li><li><a href="https://auth0.com/learn/json-web-tokens">Get Started with JSON Web Tokens</a></li><li><a href="https://jwt.io/introduction">JSON Web Token Introduction - jwt.io</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=513da89abe94" width="1" height="1" alt=""><hr><p><a href="https://systemweakness.com/how-to-test-for-jwt-attacks-513da89abe94">How to test for JWT attacks?</a> was originally published in <a href="https://systemweakness.com/">System Weakness</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[VTF - CTF Write-up]]></title>
            <link>https://medium.com/@elsherifx00/vtf-ctf-write-up-d433715568ee?source=rss-bf59e9cfff8c------2</link>
            <guid isPermaLink="false">https://medium.com/p/d433715568ee</guid>
            <category><![CDATA[ctf]]></category>
            <category><![CDATA[ctf-writeup]]></category>
            <category><![CDATA[ctf-2021]]></category>
            <dc:creator><![CDATA[Ahmed Elsherif]]></dc:creator>
            <pubDate>Wed, 15 Dec 2021 15:29:45 GMT</pubDate>
            <atom:updated>2021-12-16T12:01:21.498Z</atom:updated>
            <content:encoded><![CDATA[<h3>VTF - CTF</h3><p>Hi folks;<br>This is my write-up for <strong>VTF Penetration Testing Internship CTF</strong>. It’s an easy CTF , I hope you enjoy it.<br>Let’s get started</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/1*0uYoJqxJfUjB8b6cIw9fUw.gif" /></figure><p><strong>first</strong>, we have this login page</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/474/1*DG4C8TohmM3LuTp9KEvKAA.png" /></figure><p>I tried to Login as default credentials (admin - admin) , but I got this poped-up message</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/445/1*CXRngVi32HCl0468Rsb7jw.png" /></figure><p>I tried <strong>admin’</strong> in Email &amp; password but I had the same message , So I tried <strong>123&quot;</strong> in<em> password box</em> and I got this error</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TpCsIImkINiOHAZhnY8lHg.png" /></figure><p>So I know that it’s vulnerable to <em>SQLi </em>, So what we do now is <em>Authentication bypass via SQLi</em>.<br>As we see in the photo above , there is <strong>“)</strong> after <strong>123”</strong> , So <strong><em>let’s balance it</em></strong><em> </em><br>I begain my payload with <strong>“)</strong> to balance our payload <br>SO I tried this payload in the password box <strong>“) or 1=1#</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_1-p-ojpDbwiuGs5mqnvLg.png" /></figure><p>As we see I got an error which means that the <strong>or</strong> in my payload is fetched , So I tried to bypass it by <strong>oorr , </strong>our payload will be <strong>“) oorr 1=1#</strong> <br>finally I bypassed it and I got another page has a box to enter URL. when I enter any URL like<strong> </strong><a href="https://google.com/"><strong>https://google.com</strong></a> , I found a parameter <strong><em>url </em></strong><br>SO I think it may be SSRF vulnerability</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/850/1*bm2QWTaep6ypVuvHskKzpA.png" /><figcaption>page after login bypass</figcaption></figure><p>I tried this payload <a href="http://127.0.0.1/"><strong>http://127.0.0.1</strong></a> but I got You’ve been blocked!!! message</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7rqgsq5RZX09bmGe4zygFg.png" /></figure><p>I tried this payload <strong>localhost</strong> but it is the same message <br>I tried a lot of payloads but nothing happened until I tried this payload</p><p><a href="http://[::]:8000/">http://[::]:8000</a> <br>and Finally I got the flag</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/211/1*kXu3a4SX3n6gfX7x-tQrFg.png" /><figcaption>flag</figcaption></figure><p>Thanks for reading 😍<br>See you in the next write-up ❤️</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d433715568ee" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>