<?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 whguswo</title><link>https://whguswo.github.io/tags/jwt/</link><description>Recent content in JWT on whguswo</description><generator>Hugo</generator><language>ko-KR</language><lastBuildDate>Sun, 14 Jul 2024 00:00:00 +0900</lastBuildDate><atom:link href="https://whguswo.github.io/tags/jwt/index.xml" rel="self" type="application/rss+xml"/><item><title>JWT Confusion</title><link>https://whguswo.github.io/posts/jwt-confusion/</link><pubDate>Sun, 14 Jul 2024 00:00:00 +0900</pubDate><guid>https://whguswo.github.io/posts/jwt-confusion/</guid><description>&lt;h2 id="refer"&gt;Refer&lt;/h2&gt;&#10;&lt;p&gt;&lt;a href="https://portswigger.net/web-security/jwt/algorithm-confusion#deriving-public-keys-from-existing-tokens"&gt;Portswigger Document&lt;/a&gt;&lt;br&gt;&#10;&lt;a href="https://velog.io/@thelm3716/JWTvul#%F0%9F%A9%B8-exploitation-2"&gt;JWT vulnerability🩸&lt;/a&gt;&lt;/p&gt;&#10;&lt;h2 id="info"&gt;Info&lt;/h2&gt;&#10;&lt;p&gt;This Problem is JWT confusion.&lt;/p&gt;&#10;&lt;p&gt;RS256 uses an asymmetric key, a private key for generation, and a public key for verification.&lt;/p&gt;&#10;&lt;p&gt;HS256 uses public keys for both token creation and verification. By using the difference between the two, authentication can be bypassed by extracting the public key of RS256 and creating a token with HS256 when verifying both methods.&lt;/p&gt;&#10;&lt;p&gt;Key extract : &lt;a href="https://github.com/silentsignal/rsa_sign2n/tree/release/standalone"&gt;https://github.com/silentsignal/rsa_sign2n/tree/release/standalone&lt;/a&gt;&lt;/p&gt;&#10;&lt;h2 id="exploit"&gt;Exploit&lt;/h2&gt;&#10;&lt;p&gt;After Extract key, you can sign JWT as You Want.&lt;/p&gt;</description></item></channel></rss>