GitHub - Hackmanit/TInjA: TInjA is a CLI tool for testing web pages for template injection vulnerabilities and supports 44 of the most relevant template engines for eight different programming languages. (original) (raw)

Release Go Report Card GitHub go.mod Go version License

TInjA – the Template INJection Analyzer

TInjA is a CLI tool for testing web pages for template injection vulnerabilities.

It supports 44 of the most relevant template engines (as of September 2023) for eight different programming languages.

TInjA was developed by Hackmanit and Maximilian Hildebrand.

Features

Supported Template Engines

.NET

Elixir

Go

Java

JavaScript

PHP

Python

Ruby

Installation

Option 1: Prebuilt Binary

Prebuilt binaries of TInjA are provided on the releases page.

Option 2: Install Using Go

Requirements: go1.21 or higher

go install -v github.com/Hackmanit/TInjA@latest

Usage

{ "request":{ "method":"POST", "endpoint":"http://example.com/path", "body":"name=Kirlia", "headers":{ "Content-Type":"application/x-www-form-urlencoded" } }

Specify Headers, Cookies, and POST Body

Scan CSTI in Addition to SSTI

By default TInjA only scans for SSTI. A headless browser is utilized for scanning for CSTI, which may increase RAM and CPU usage.

Generate a JSONL Report

Use a Proxy

To scan HTTPS URLs using a proxy a CA certificate of the proxy in PEM format is needed. Burp Suite CA certificates are provided in DER format, for example. To convert them, the following command can be used:

openssl x509 -inform DER -outform PEM -text -in cacert.der -out cacert.pem

Set a Ratelimit

Troubleshooting

TODOs

Background Information

A blog post providing more information about template injection and TInjA – the Template INJection Analyzer can be found here:

Template Injection Vulnerabilities – Understand, Detect, Identify

TInjA was developed as a part of a master's thesis by Maximilian Hildebrand. You can find results of the master's thesis publicly available here:

License

TInjA – the Template INJection Analyzer was developed by Hackmanit and Maximilian Hildebrand as a part of his master's thesis. TInjA – the Template INJection Analyzer is licensed under the Apache License, Version 2.0.