关注我们
带你读懂网络安全
静态代码分析工具Vulnhuntr利用Claude AI识别零日漏洞,并推测漏洞利用代码。
前情回顾·大模型攻击能力动态
自动遍历用户输入环节代码,
分析完整调用链
目前已发现十几个零日漏洞
任意文件覆盖(AFO)
本地文件包含(LFI)
服务器端请求伪造(SSRF)
跨站脚本攻击(XSS)
不安全的直接对象引用(IDOR)
SQL注入(SQLi)
远程代码执行(RCE)
gpt_academic,GitHub上有64k星标,发现LFI和XSS漏洞
ComfyUI,50K星标,发现XSS漏洞
FastChat,35K星标,发现SSRF漏洞
Ragflow,16K星标,发现RCE漏洞
该项目仍存在局限性
scratchpad:
1. Analyzing the add_llm function in llm_app.py.
2. Identified user input used as keys to access dictionaries: EmbeddingModel, ChatModel, RerankModel, CvModel, and TTSModel.
3. These dictionaries contain class references, which are instantiated with user-supplied parameters.
4. The factory variable is directly used from user input (req['llm_factory']) without proper validation. [...]
----------------------------------------
analysis:
The add_llm function in llm_app.py contains a critical Remote Code Execution (RCE) vulnerability. The function uses user-supplied input (req['llm_factory'] and req['llm_name']) to dynamically instantiate classes from the EmbeddingModel, ChatModel, RerankModel, CvModel, and TTSModel dictionaries. This pattern of using user input as a key to access and instantiate classes is inherently dangerous, as it allows an attacker to potentially execute arbitrary code. The vulnerability is exacerbated by the lack of comprehensive input validation or sanitization on these user-supplied values. [...]
----------------------------------------
poc:
POST /add_llm HTTP/1.1
Host: target.com
Content-Type: application/json
Authorization: Bearer <valid_token>
{ "llm_factory": "__import__('os').system", "llm_name": "id", "model_type": "EMBEDDING", "api_key": "dummy_key"}
----------------------------------------
confidence_score: 8
----------------------------------------
vulnerability_types:
- RCE
----------------------------------------
首次利用大模型
在真实环境发现零日漏洞
参考资料:theregister.com
推荐站内搜索:最好用的开发软件、免费开源系统、渗透测试工具云盘下载、最新渗透测试资料、最新黑客工具下载……
还没有评论,来说两句吧...