mirror of
https://github.com/lunchcat/sif.git
synced 2026-07-28 14:37:01 -07:00
add recon modules for unauthenticated inference servers that expose an openai-style /v1/models inventory without a key: vllm, llama.cpp, lm studio, and infinity.
45 lines
1004 B
YAML
45 lines
1004 B
YAML
# LM Studio API Exposure Detection Module
|
|
|
|
id: lmstudio-api-exposure
|
|
info:
|
|
name: LM Studio API Exposure
|
|
author: sif
|
|
severity: medium
|
|
description: Detects an exposed LM Studio server whose native rest api lists the local models with their quantization, architecture, and context length; with the optional api-token auth left disabled (the default) it serves unauthenticated inference and model load and unload requests
|
|
tags: [lmstudio, llm, ai, inference, api, exposure, recon]
|
|
|
|
type: http
|
|
|
|
http:
|
|
method: GET
|
|
paths:
|
|
- "{{BaseURL}}/api/v0/models"
|
|
|
|
matchers:
|
|
- type: status
|
|
status:
|
|
- 200
|
|
|
|
- type: word
|
|
part: body
|
|
words:
|
|
- "\"compatibility_type\""
|
|
|
|
- type: word
|
|
part: body
|
|
words:
|
|
- "\"quantization\""
|
|
|
|
- type: word
|
|
part: body
|
|
words:
|
|
- "\"max_context_length\""
|
|
|
|
extractors:
|
|
- type: regex
|
|
name: lmstudio_model
|
|
part: body
|
|
regex:
|
|
- '"id"\s*:\s*"([^"]+)"'
|
|
group: 1
|