Skip to content
KitploitKITPLOIT
도구블로그
제출
도구블로그
제출

해킹, 침투 테스트 및 사이버 보안 도구를 당신의 보안 무기고에!

Kitploit은 해킹, 사이버 보안 및 침투 테스트 도구 디렉토리입니다. 최신 프로젝트 업데이트를 발견하여 취약점을 찾고, 시스템을 분석하고, 테스트를 자동화하고, 보안을 강화하세요.

··피드·문의·개인정보·© 2026 Kitploit

도구 디렉토리

카테고리

모든 카테고리 보기
Loading categories
vulnhuntr — LLM을 활용한 제로 샷 취약점 발견 | Kitploit
도구/GitHubGitHub/protectai/vulnhuntr
Static AnalysisVulnerability AnalysisCode AnalysisWeb Application ExploitationPenetration TestingAI Security
GitHubprotectai/vulnhuntr

vulnhuntr

LLM을 활용한 제로 샷 취약점 발견

저장소 보기
2.7k3181년 전Kitploit 검토 완료

인기

모두 보기 →

커뮤니티에서 가장 많이 사용되는 도구를 찾아보세요.

모든 도구 탐색

도구 컬렉션을 둘러보세요

모든 도구 보기 →
공유
Vulnhuntr Logo

LLM과 정적 코드 분석을 사용하여 원격으로 악용 가능한 취약점을 식별하는 도구입니다.

세계 최초로 자율 AI가 발견한 0데이 취약점

설명

Vulnhuntr은 LLM의 힘을 활용하여 원격 사용자 입력에서 시작하여 서버 출력으로 끝나는 전체 코드 호출 체인을 자동으로 생성 및 분석함으로써, 기존 정적 코드 분석 도구가 수행할 수 있는 범위를 훨씬 넘어서는 복잡하고 다단계이며 보안을 우회하는 취약점을 탐지합니다. 모든 0데이에 대한 Vulnhuntr 출력을 포함한 모든 세부 사항은 여기에서 확인하세요: Protect AI Vulnhuntr 블로그

발견된 취약점

[!TIP] Vulnhuntr을 사용하여 취약점을 발견하셨나요? huntr.com에 보고서를 제출하여 보상을 받고 아래 목록에 추가하는 PR을 제출하세요!

[!NOTE] 이 표는 지금까지 발견된 취약점 중 일부입니다. 책임 있는 공개 기간이 종료됨에 따라 점차 공개할 예정입니다.

저장소별표취약점
gpt_academic67kLFI, XSS
ComfyUI66kXSS
Langflow46kRCE, IDOR
FastChat37kSSRF
Ragflow31kRCE
LLaVA21kSSRF
gpt-researcher17kAFO
Letta14kAFO

제한 사항

  • Python 코드베이스만 지원됩니다.
  • 다음 취약점 클래스만 식별할 수 있습니다:
    • 로컬 파일 포함 (LFI)
    • 임의 파일 덮어쓰기 (AFO)
    • 원격 코드 실행 (RCE)
    • 사이트 간 스크립팅 (XSS)
    • SQL 삽입 (SQLI)
    • 서버 측 요청 위조 (SSRF)
    • 안전하지 않은 직접 객체 참조 (IDOR)

설치

[!IMPORTANT] Vulnhuntr은 Python 코드를 구문 분석하는 데 사용하는 Jedi의 여러 버그로 인해 Python 3.10을 엄격히 요구합니다. 다른 버전의 Python으로 설치하면 안정적으로 작동하지 않습니다.

pipx 또는 Docker를 사용하여 Vulnhuntr을 쉽게 설치하고 실행하는 것을 권장합니다.

Docker 사용:

root@kitploit:~
docker build -t vulnhuntr https://github.com/protectai/vulnhuntr.git#main

pipx 사용:

root@kitploit:~
pipx install git+https://github.com/protectai/vulnhuntr.git --python python3.10

또는 소스에서 직접 poetry를 사용하여 설치할 수 있습니다:

root@kitploit:~
git clone https://github.com/protectai/vulnhuntr
cd vulnhuntr && poetry install

사용법

이 도구는 GitHub 저장소를 분석하여 잠재적으로 원격으로 악용 가능한 취약점을 찾도록 설계되었습니다. 이 도구는 API 키와 GitHub 저장소의 로컬 경로가 필요합니다. 또한 LLM 서비스의 사용자 정의 엔드포인트를 선택적으로 지정할 수 있습니다.

[!CAUTION] 사용하는 LLM 제공 업체에서 항상 지출 한도를 설정하거나 비용을 면밀히 모니터링하세요. 이 도구는 LLM의 컨텍스트 창에 최대한 많은 코드를 맞추려고 시도하므로 상당한 비용이 발생할 수 있습니다.

[!TIP] LLM으로는 Claude 사용을 권장합니다. 테스트 결과 GPT보다 더 나은 결과를 얻었습니다.

명령줄 인터페이스

root@kitploit:~
usage: vulnhuntr [-h] -r ROOT [-a ANALYZE] [-l {claude,gpt,ollama}] [-v]

Analyze a GitHub project for vulnerabilities. Export your ANTHROPIC_API_KEY/OPENAI_API_KEY before running.

options:
  -h, --help            show this help message and exit
  -r ROOT, --root ROOT  Path to the root directory of the project
  -a ANALYZE, --analyze ANALYZE
                        Specific path or file within the project to analyze
  -l {claude,gpt,ollama}, --llm {claude,gpt,ollama}
                        LLM client to use (default: claude)
  -v, --verbosity       Increase output verbosity (-v for INFO, -vv for DEBUG)

예제

pipx 설치에서 Claude를 사용하여 전체 저장소 분석:

root@kitploit:~
export ANTHROPIC_API_KEY="sk-1234"
vulnhuntr -r /path/to/target/repo/

[!TIP] Vulnhuntr에 원격 사용자 입력을 처리하는 특정 파일을 지정하고 개별적으로 스캔할 것을 권장합니다.

pipx 설치에서 /path/to/target/repo/server.py 파일을 GPT-4o를 사용하여 분석. 파일 대신 하위 디렉토리를 지정할 수도 있습니다:

root@kitploit:~
export OPENAI_API_KEY="sk-1234"
vulnhuntr -r /path/to/target/repo/ -a server.py -l gpt 

Docker 설치에서 Claude와 사용자 정의 엔드포인트를 사용하여 /local/path/to/target/repo/repo-subfolder/target-file.py 분석:

root@kitploit:~
docker run --rm -e ANTHROPIC_API_KEY=sk-1234 -e ANTHROPIC_BASE_URL=https://localhost:1234/api -v /local/path/to/target/repo:/repo vulnhuntr:latest -r /repo -a repo-subfolder/target-file.py

실험적

Ollama도 옵션으로 포함되어 있지만, 오픈 소스 모델이 출력을 올바르게 구조화하는 데는 성공하지 못했습니다.

root@kitploit:~
export OLLAMA_BASE_URL=http://localhost:11434/api/generate
export OLLAMA_MODEL=llama3.2
vulnhuntr -r /path/to/target/repo/ -a server.py -l ollama

로직 흐름

VulnHuntr 로직

  • LLM이 README를 요약하고 이를 시스템 프롬프트에 포함
  • LLM이 전체 파일에 대한 초기 분석을 수행하고 잠재적인 취약점 보고
  • 그런 다음 Vulnhuntr이 LLM에 2차 분석을 위한 취약점별 프롬프트 제공
  • LLM이 코드를 분석할 때마다 프로젝트의 다른 파일에서 추가 컨텍스트 함수/클래스/변수를 요청
  • 사용자 입력부터 서버 처리까지의 전체 호출 체인이 완료될 때까지 이 작업을 계속한 후 최종 분석 제공
  • 최종 분석은 추론, 개념 증명 익스플로잇, 신뢰도 점수로 구성

[!TIP] 일반적으로 신뢰도 점수가 7 미만이면 취약점이 없을 가능성이 높습니다. 7점은 조사가 필요함을 의미하며, 8점 이상은 유효한 취약점일 가능성이 매우 높습니다.

출력

이 도구는 분석된 파일에서 발견된 취약점에 대한 상세 보고서를 생성합니다. 보고서에는 다음이 포함됩니다:

  • 각 파일에 대한 초기 평가 결과
  • 컨텍스트 함수 및 클래스 참조를 포함한 2차 평가 결과
  • 발견된 취약점에 대한 신뢰도 점수
  • 분석 과정 로그
  • PoC 익스플로잇

다음은 Ragflow (현재 수정됨)에서 발견된 0데이 원격 코드 실행 취약점을 설명하는 Vulnhuntr 보고서 예시입니다:

root@kitploit:~
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. 5. The llm_name is also derived from user input in most cases. 6. The 
instantiation of these classes occurs in try-except blocks, but exceptions are only used for error messages, not preventing execution. 7. The api_key 
and other sensitive information are passed directly to these instantiated classes. 8. There's no comprehensive input validation or sanitization for the 
factory or llm_name variables. 9. The vulnerability is in a route decorated with @login_required, indicating it's accessible to authenticated users. 10.
Reviewing the EmbeddingModel, ChatModel, RerankModel, CvModel, and TTSModel dictionaries to understand their contents and potential for exploitation.
----------------------------------------

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. While there are some checks for specific factory types, they are not exhaustive and can be bypassed. An attacker could potentially
provide a malicious value for 'llm_factory' that, when used as an index to these model dictionaries, results in the execution of arbitrary code. The 
vulnerability is particularly severe because it occurs in a route decorated with @login_required, suggesting it's accessible to authenticated users, 
which might give a false sense of security.
----------------------------------------

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"
  }
  
  This payload attempts to exploit the vulnerability by setting 'llm_factory' to a string that, when evaluated, imports the os module and calls system. 
The 'llm_name' is set to 'id', which would be executed as a system command if the exploit is successful.
----------------------------------------

confidence_score:
  8
----------------------------------------

vulnerability_types:
  - RCE
----------------------------------------

로깅

이 도구는 분석 과정과 결과를 vulhuntr.log 파일에 기록합니다. 이 파일에는 초기 평가 및 2차 평가를 포함한 분석의 각 단계에 대한 상세 정보가 포함됩니다.

저자

  • Dan McInerney: [email protected], @DanHMcinerney
  • Marcello Salvati: [email protected], @byt3bl33d3r
도구 다운로드