Hard Web & API Security +700 XP

FortiPy

A mysterious corporate application called TechSphere has caught your attention. 🕵️ Behind its professional facade lies a complex security landscape waiting to be explored. This multi-layered penetration testing scenario will challenge your reconnaissance skills, exploitation techniques, and system analysis capabilities. 💻 Are you ready to navigate through the corporate security infrastructure and demonstrate your expertise? 🏆

45% solve it 130 hackers played 2 flags Updated Oct 06, 2026 First blood
Web Application SecuritySSTIFlask SecuritySSH Brute ForceDatabase EnumerationHash Cracking
Start Your Challenge
  1. 1Create a free account, then click "Start Lab"You'll get your own private machine with an IP address
  2. 2Explore the targetOpen the IP in your browser and look for vulnerabilities
  3. 3Find and submit flagsFlags are secret text strings hidden in the system - paste them below to score
  • ~1-2 min setup
  • Private instance
  • 30 min per session. Restart it for free, as often as you like.

Server-Side Template Injection (SSTI) is a critical web vulnerability that occurs when user input is embedded directly into server-side template engine syntax. Template engines like Jinja2 (used in Flask and Django), Twig (PHP), and Freemarker (Java) provide powerful features including variable evaluation and code execution. When an application incorporates untrusted input into templates without proper sanitization, attackers can inject template expressions that execute arbitrary code on the server.

SSTI in Flask and Jinja2 Applications

Flask, a popular Python web framework, uses the Jinja2 template engine by default. SSTI vulnerabilities in Flask applications arise when user input is rendered directly as part of a template string rather than being passed as a variable. For example, using render_template_string("Hello " + user_input) instead of render_template_string("Hello {{name}}", name=user_input) allows template injection. Attackers can inject Jinja2 expressions like {{config.items()}} to leak configuration data or use Python's object hierarchy to achieve Remote Code Execution through payloads that access os.popen() or subprocess modules.

Multi-Stage Web Application Assessment

Real-world penetration testing often involves combining multiple techniques to progress through an application's defenses. Initial reconnaissance might reveal an SSH service requiring brute-force attacks to discover valid credentials. Database enumeration can expose additional accounts with hashed passwords that need cracking. Each stage provides information or access needed for the next, creating an attack chain that demonstrates how seemingly isolated vulnerabilities compound into critical risk when chained together.

Hash Cracking and Credential Recovery

Password hashes discovered during database enumeration or file system analysis must be cracked to progress further. Tools like Hashcat and John the Ripper support numerous hash formats and attack modes including dictionary attacks, rule-based mutations, and brute-force. Understanding hash identification, selecting appropriate wordlists, and optimizing cracking parameters are essential skills for penetration testers. Recovered credentials often provide access to additional services or higher-privilege accounts, enabling privilege escalation to complete system compromise.

What You Will Learn

  • Understand Server-Side Template Injection (SSTI) in Flask/Jinja2 applications
  • Learn SSH brute-force techniques for initial access
  • Practice database enumeration and credential extraction
  • Develop hash cracking skills using Hashcat and John the Ripper
  • Chain multiple attack vectors for complete system compromise
  • Master privilege escalation techniques on Linux systems

Prerequisites

Python fundamentals Web application security basics Linux command line Understanding of template engines Basic knowledge of hashing
Contributors

Credited contributors

These hackers reported issues, improved content, and helped harden this page.