Cyber security

TInjA – The Template INJection Analyzer

TInjA is a powerful CLI tool designed to detect and identify template injection vulnerabilities in web applications.

Developed by Hackmanit and Maximilian Hildebrand, it supports 44 of the most relevant template engines across eight programming languages, including Python, Java, JavaScript, and more.

Key Features

  • Automatic Detection and Identification: TInjA automatically detects template injection possibilities and identifies the template engine in use. It supports both server-side template injection (SSTI) and client-side template injection (CSTI) vulnerabilities.
  • Efficient Scanning: The tool uses polyglots to efficiently scan web pages. On average, only five polyglots are needed to detect vulnerabilities and identify the template engine.
  • Customization Options: Users can specify custom headers, cookies, POST parameters, and query parameters for the scan. It also allows routing traffic through a proxy and configuring ratelimiting to manage the number of requests per second.
  • Reporting and Output: TInjA can generate reports in JSONL format, providing detailed insights into the scan results. This feature is useful for tracking and analyzing vulnerabilities across multiple URLs.

TInjA supports a wide range of template engines across different programming languages:

  • .NET: DotLiquid, Fluid, Razor Engine, Scriban
  • Elixir: EEx
  • Go: html/template, text/template
  • Java: Freemarker, Groovy, Thymeleaf, Velocity
  • JavaScript: Angular.js, Dot, EJS, Eta, Handlebars, Hogan.js, Mustache, Nunjucks, Pug, Twig.js, Underscore, Velocity.js, Vue.js
  • PHP: Blade, Latte, Mustache.php, Smarty, Twig
  • Python: Chameleon, Cheetah3, Django, Jinja2, Mako, Pystache, SimpleTemplate Engine, Tornado
  • Ruby: ERB, Erubi, Erubis, Haml, Liquid, Mustache, Slim

TInjA can be installed using prebuilt binaries or by compiling it with Go (version 1.21 or higher). The tool offers flexible usage options, including scanning single URLs, multiple URLs, or URLs provided in a file.

It also supports passing raw HTTP requests and JSONL files for more complex scenarios. TInjA was developed as part of a master’s thesis by Maximilian Hildebrand.

It is part of a broader project that includes the Template Injection Table and the Template Injection Playground, which provide additional resources for understanding and testing template injection vulnerabilities.

TInjA is licensed under the Apache License, Version 2.0, making it freely available for use and modification.

Varshini

Varshini is a Cyber Security expert in Threat Analysis, Vulnerability Assessment, and Research. Passionate about staying ahead of emerging Threats and Technologies.

Recent Posts

Pystinger : Bypass Firewall For Traffic Forwarding Using Webshell

Pystinger is a Python-based tool that enables SOCKS4 proxying and port mapping through webshells. It…

6 days ago

CVE-Search : A Tool To Perform Local Searches For Known Vulnerabilities

Introduction When it comes to cybersecurity, speed and privacy are critical. Public vulnerability databases like…

6 days ago

CVE-Search : A Tool To Perform Local Searches For Known Vulnerabilities

Introduction When it comes to cybersecurity, speed and privacy are critical. Public vulnerability databases like…

6 days ago

How to Bash Append to File: A Simple Guide for Beginners

If you are working with Linux or writing bash scripts, one of the most common…

6 days ago

Mastering the Bash Case Statement with Simple Examples

What is a bash case statement? A bash case statement is a way to control…

6 days ago

How to Check if a File Exists in Bash – Simply Explained

Why Do We Check Files in Bash? When writing a Bash script, you often work…

1 week ago