Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

引入yaml poc 使用cli.py运行脚本时响应协议处理有问题 #356

Closed
chenjiewei123 opened this issue Feb 16, 2023 · 1 comment
Closed

Comments

@chenjiewei123
Copy link

image

引入yaml poc 使用cli.py运行脚本时响应协议处理有问题,本身链接时https,但是在第一次请求之后还是以http来请求,响应中回跳转到https,但是第二次响应中返回的结果和实际测试有区别,本身应该是返回302,结果还是返回301。测试的脚本是yaml的CVE-2022-26134利用脚本

image

image

@13ph03nix
Copy link
Contributor

感谢指出,_check() 方法协议纠正对 30x 跳转的处理存在问题。本来的意图是考虑 http 跳转 https,没考虑到路径跳转。

"""
https://github.com/knownsec/pocsuite3/issues/330
status_code:
- 30x
- 50x
"""
if not str(res.status_code).startswith('20'):
continue
break
except requests.RequestException:
pass

预计下个版本修复,可以临时 patch 下。

< if not str(res.status_code).startswith('20'):
---
> if str(res.status_code).startswith('50'):

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants