-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DSL兼容性问题 #8
Comments
|
是的, 目前提供了的randstr和randnum都是固定长度的
这和nuclei的实现方式有关. nuclei的randstr_1/rand_num 在 template compile前进行的replace, 要引入这种方式会极大降低性能. 后续我计划通过提供randstrn(1), randomn(2)这样的dsl函数代替实现类似的功能 |
nuclei老版本使用req-condition 字段控制这个功能, 新版本已经是自动的. neutron也适配了对应的特性 |
现在测试这个poc不会漏报了。对于 |
还是有问题,最新的代码,使用 另外,neutron在匹配dsl的时候不会解析{{randstr}},而是会当作常规字符串。因此gogo使用该poc时因为发出随机字符串,匹配{{randstr}}常规字符串,导致无法匹配成功; |
有一个不太通用的解决办法, 我可以把randstr_1到randstr_9 , 以及16,32,64 这些常见的length手动注册进去, 但是更大的数字就无法一一覆盖, 你觉得这个办法如何? |
shot中randstr未解析的问题我没有复现, 是否可以提供对应的测试yaml
|
我确认了一下, 在nuclei原本中, 也不会存在randstr |
我用那个poc测试似乎不存在这个bug,你可以更新到最新的测试下 |
确实是我的问题,pull之后看到Already up to date.以为是最新了,结果忘了当前还有几个未追踪的修改,而且偏偏又不小心多注释掉了这一行 neutron/protocols/http/request_generator.go Line 349 in 5f9e965
|
from flask import Flask, request, Response, jsonify
import io
app = Flask(__name__)
# 全局变量用于存储上传的文件内容
uploaded_content = ""
@app.route('/k3cloud/SRM/ScpSupRegHandler', methods=['POST'])
def upload_file():
global uploaded_content
# 检查请求的Content-Type是否为multipart/form-data
if request.content_type.startswith("multipart/form-data"):
# 获取上传的文件
uploaded_file = request.files.get('FAtt')
if uploaded_file:
# 读取文件内容并存储到全局变量
uploaded_content = uploaded_file.read().decode('utf-8')
# 返回成功的JSON响应
return jsonify({
"IsSuccess": True,
"Msg": "附件保存成功!"
}), 200
return "Invalid request.", 400
@app.route('/K3Cloud/uploadfiles/<filename>.txt', methods=['GET'])
def serve_file(filename):
global uploaded_content
if not uploaded_content:
return "No content uploaded yet.", 404
return Response(uploaded_content, mimetype='text/plain')
if __name__ == '__main__':
app.run(host='0.0.0.0', port=8090) |
用的这个poc:
https://github.com/iamHuFei/HVVault/blob/4558fdb/oa/%E9%87%91%E8%9D%B6OA/kingdee-erp-srm-scpsupreghandler-fileupload.yaml
两个请求包都正确发出去了,但是
用nuclei和yakit都是可以扫出漏洞的,但是neutron不行
200 == 200
后,neutron显示OK: &{true false map[] map[] [] map[] map[] map[filename:OStCs]}
status_code_1 == 200
,neutron就不行了status_code == 200
,成功- contains((body_1), 'true')
,失败- contains((body), 'true')
,成功contains((body), '{{randstr}}')
,失败The text was updated successfully, but these errors were encountered: