目标达成 感谢每一位支持者 — 我们达成了 100% 目标!

目标: 1000 元 · 已筹: 1336 元

100%

CVE-2015-9235 PoC — jsonwebtoken node模块安全漏洞

来源
关联漏洞
标题: jsonwebtoken node模块安全漏洞 (CVE-2015-9235)
Description:jsonwebtoken node module是一个用于node.js的JSON Web Taken(JWT)实现。 jsonwebtoken node模块4.2.2之前版本中存在安全漏洞,该漏洞源于程序使用了相同的签名来验证两种类型的令牌。攻击者可利用该漏洞绕过令牌验证。
Description
JWT Key Confusion PoC (CVE-2015-9235) Written for the Hack the Box challenge - Under Construction
介绍
# JWT Key Confusion PoC (CVE-2015-9235)

Written for the Hack the Box challenges - Under Construction and Secret

Both included scripts perform a Java Web Token Key Confusion Attack (CVE-2015-9235).

To perform the attack it is required that the attacker know the public key which the server will use to verify the signature as well as the server being configured to use the HS256 algorithm. Because HS256 is a symmetric-key algorithm (the same key is used to sign and verify the message), we can use the public key to sign our tampered token. 
Since the web server knows the public key, when it receives the tampered token it will be able to verify it. 

## Screenshot

![jwt_confusion](https://user-images.githubusercontent.com/6628565/149454773-86c5f286-e411-42be-ab83-a79205ae0373.png)

## Usage


```python3 jwt-9235.py [-h] [token_location] [claim_key] [claim_value]```

```
positional arguments:
  token_location  location of JWT token (must include 'pk' payload)
  claim_key       payload claim to target
  claim_value     new claim value

optional arguments:
  -h, --help      show this help message and exit
```
If no arguments are provided the application will look for a token file ```./token```, target the ```username``` claim, and replace the claim value with ```‘ or 1=1;–```

## Requirements

```pip install hashlib hmac base64 json argparse colorama```
文件快照

登录后查看神龙缓存的 POC 文件快照

登录查看
备注
    1. 建议优先通过来源进行访问。
    2. 本地 POC 快照面向订阅用户开放;当原始来源失效或无法访问时,本地镜像作为订阅权益的一部分提供。
    3. 持续抓取、验证、维护这份 POC 档案需要不少投入,因此本地快照已纳入付费订阅。您的订阅是让这份资料能继续走下去的关键,由衷感谢。 查看订阅方案 →