tarunkant/Gopherus: This tool generates gopher link for exploiting SSRF and gaining RCE in various servers ssrf攻击链生成工具
2019-07-06 01:33:36 Author: github.com(查看原文) 阅读量:377 收藏

Join GitHub today

GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.

Sign up

This tool generates gopher link for exploiting SSRF and gaining RCE in various servers

If you know a place which is SSRF vulnerable then, this tool will help you to generate Gopher payload for exploiting SSRF (Server Side Request Forgery) and gaining RCE (Remote Code Execution). And also it will help you to get the Reverse shell on the victim server. And for more information you can get a blog on the same Blog on Gopherus

About

This tool can generate payload for following:

  1. MySQL (Port-3306)
  2. FastCGI (Port-9000)
  3. Memcached (Port-11211)
        If stored data is getting De-serialized by:
          * Python
          * Ruby
          * PHP
  4. Redis (Port-6379)
  5. Zabbix (Port-10050)
  6. SMTP (Port-25)

Installation

Usage

Command Description
gopherus --help Help
gopherus --exploit Arguments can be :
--exploit mysql
--exploit fastcgi
--exploit redis
--exploit zabbix
--exploit pymemcache
--exploit rbmemcache
--exploit phpmemcache
--exploit dmpmemcache
--exploit smtp

Examples

  • MySQL: If the user is not protected with password you can dump his database and also you can put malicious files in his system.

      It only asks username of the MySQL user and it will provide you gopher link.

  • FastCGI: If port 9000 is open with no security then you can get RCE.
gopherus --exploit fastcgi

      It only asks for a file which must be present in the victim system(preferable .php file), BTW we have default one.

  • Redis: If redis port is open then we can overwrite the file in the system which is too dangerous.
    So here is two things you can get:
    a. Reverse Shell
    b. PHP Shell
  • Zabbix: If port 10050 is open and EnableRemoteCommands = 1 then you can run shell commands on the victim system.
gopherus --exploit zabbix
  • Memcached: It is used for mainly storing serialized data, but when it comes to De-serialize these data then known vulnerability such as PHP De-serialization issue, Python-Pickle De-serialization issue, Ruby-Marshal De-serialization issue comes into picture which can lead to RCE.
    So for each of them I created different scripts and also one script for dumping Memcached content:
gopherus --exploit pymemcache
gopherus --exploit rbmemcache
gopherus --exploit phpmemcache
gopherus --exploit dmpmemcache
  • SMTP: If port 25 is open and we can access it then, we can send message to anyone as victim user, So this tool will generate gopher payload for sending mail.

Screenshots

image image image image image

Author

Tarunkant Gupta (SpyD3r)

Reference


文章来源: https://github.com/tarunkant/Gopherus
如有侵权请联系:admin#unsafe.sh