<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>JWT on RORO's blog</title><link>https://blog.rodolpheg.xyz/fr/tags/jwt/</link><description>Recent content in JWT on RORO's blog</description><generator>Hugo</generator><language>fr</language><managingEditor>contact@rodolpheg.xyz (0xRo)</managingEditor><webMaster>contact@rodolpheg.xyz (0xRo)</webMaster><lastBuildDate>Sun, 21 Sep 2025 00:00:00 +0000</lastBuildDate><atom:link href="https://blog.rodolpheg.xyz/fr/tags/jwt/index.xml" rel="self" type="application/rss+xml"/><item><title>Amazon AppSec CTF : HalCrypto</title><link>https://blog.rodolpheg.xyz/fr/posts/halcrypto/</link><pubDate>Sun, 21 Sep 2025 00:00:00 +0000</pubDate><author>contact@rodolpheg.xyz (0xRo)</author><guid>https://blog.rodolpheg.xyz/fr/posts/halcrypto/</guid><description>&lt;h2 id="synthese">Synthese&lt;/h2>
&lt;ul>
&lt;li>&lt;strong>Challenge&lt;/strong> : HalCrypto&lt;/li>
&lt;li>&lt;strong>Categorie&lt;/strong> : Securite Web&lt;/li>
&lt;li>&lt;strong>Vulnerabilite&lt;/strong> : Contournement de la validation JWT via confusion d&amp;rsquo;URL avec le symbole @&lt;/li>
&lt;li>&lt;strong>Impact&lt;/strong> : Contournement de l&amp;rsquo;authentification menant a un acces administrateur&lt;/li>
&lt;li>&lt;strong>Flag&lt;/strong> : &lt;code>HTB{r3d1r3c73d_70_my_s3cr37s}&lt;/code>&lt;/li>
&lt;/ul>
&lt;h2 id="vue-densemble-de-la-vulnerabilite">Vue d&amp;rsquo;ensemble de la vulnerabilite&lt;/h2>
&lt;h3 id="diagramme-du-flux-dattaque">Diagramme du flux d&amp;rsquo;attaque&lt;/h3>
&lt;pre tabindex="0">&lt;code class="language-mermaid" data-lang="mermaid">graph TD
 A[User Login + Attacker JWT] --&amp;gt; B[AuthMiddleware]
 B --&amp;gt; C[Extract JKU URL from Header]
 C --&amp;gt; D{Validate JKU URL&amp;lt;br/&amp;gt;lastIndexOf check}
 D --&amp;gt;|&amp;#34;URL starts with AUTH_PROVIDER&amp;lt;br/&amp;gt;string-based comparison&amp;#34;| E[PASSES]
 D --&amp;gt;|&amp;#34;Does not start with AUTH_PROVIDER&amp;#34;| R[Rejected]

 E --&amp;gt; F[&amp;#34;Fetch JWKS from JKU URL&amp;#34;]
 F --&amp;gt; G[&amp;#34;JWT Verification with&amp;lt;br/&amp;gt;attacker&amp;#39;s public key&amp;#34;]
 G --&amp;gt; H[Auth Bypass]
 H --&amp;gt; I[Flag]

 subgraph &amp;#34;URL Confusion&amp;#34;
 J[&amp;#34;Validator sees:&amp;lt;br/&amp;gt;http://127.0.0.1:1337@attacker.com/...&amp;lt;br/&amp;gt;starts with AUTH_PROVIDER ✓&amp;#34;]
 K[&amp;#34;HTTP client connects to:&amp;lt;br/&amp;gt;attacker.com&amp;lt;br/&amp;gt;treats 127.0.0.1:1337 as credentials&amp;#34;]
 end

 D -.-&amp;gt; J
 F -.-&amp;gt; K
&lt;/code>&lt;/pre>&lt;h2 id="analyse-source-to-sink">Analyse source-to-sink&lt;/h2>
&lt;h3 id="1-point-dentree---authentification-jwt-source">1. Point d&amp;rsquo;entree - Authentification JWT (Source)&lt;/h3>
&lt;p>La vulnerabilite commence lorsque le AuthMiddleware traite les tokens JWT :&lt;/p></description></item></channel></rss>