Skip to content

ice0bear14h/struts2scan

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 

Repository files navigation

struts2 全系列漏洞扫描


概述:

针对struts2所有存在的命令执行漏洞进行汇总,对单个或多个目标进行批量漏洞扫描,更有效、简便、速度。

漏洞库:

CVE-2007-4556(s2-001) , CVE-2010-1870(s2-005),
CVE-2011-3923(s2-009) , CVE-2012-0392(s2-008),
CVE-2012-0838(s2-007) , CVE-2013-1965,
CVE-2013-1966         , CVE-2013-2135(s2-015),
CVE-2013-2251(s2-016) , CVE-2013-4316(s2-019),
CVE-2016-0785(s2-029) , CVE-2016-3081(s2-032),
CVE-2017-5638(s2-045) , CVE-2017-9791(s2-048),
CVE-2017-9805(s2-052) , CVE-2017-12611(s2-053),
CVE-2018-11776(s2-057), CVE-2019-0230(s2-059),
CVE-2020-17530(s2-061)

安装方法:

> pip3 install -r requirements.txt

使用方法:

> python3struts2scan.py -u target

> python3struts2scan.py -u target -v CVE-XXXX-XXXX -c command

> python3struts2scan.py -l targets.txt

> python3struts2scan.py -l targets.txt -v CVE-XXXX-XXXX -c command

示例:

python3 struts2scan.py -u http://192.168.68.153:8080

+---------------------------------------------------------------------+
|          _____    ,    ,             ,    _____  _____              |
|         /____ ___/___ /--- /   / ___/___ /____  _____/              |
|         ____/   /__  /    /___/\   /__   ____/ /_____  scan         |
|                                                                     |
|                  https://github.com/ice0bear14h  BY ice0bear14h     |
+---------------------------------------------------------------------+
| > python3 struts2scan.py -u target                                  |
| > python3 struts2scan.py -u target -v CVE-XXXX-XXXX -c command      |
| > python3 struts2scan.py -l targets.txt                             |
| > python3 struts2scan.py -l targets.txt -v CVE-XXXX-XXXX -c command |
+---------------------------------------------------------------------+
| Vulnerability library :                                             |
| CVE-2007-4556(s2-001) , CVE-2010-1870(s2-005) ,                     |
| CVE-2011-3923(s2-009) , CVE-2012-0392(s2-008) ,                     |
| CVE-2012-0838(s2-007) , CVE-2013-1965 ,                             |
| CVE-2013-1966 , CVE-2013-2135(s2-015) ,                             |
| CVE-2013-2251(s2-016) , CVE-2013-4316(s2-019) ,                     |
| CVE-2016-0785(s2-029) , CVE-2016-3081(s2-032) ,                     |
| CVE-2017-5638(s2-045) , CVE-2017-9791(s2-048) ,                     |
| CVE-2017-9805(s2-052) , CVE-2017-12611(s2-053) ,                    |
| CVE-2018-11776(s2-057) , CVE-2019-0230(s2-059) ,                    |
| CVE-2020-17530(s2-061)                                              |
+---------------------------------------------------------------------+
|     target     |                     Vul CVE                        |
+---------------------------------------------------------------------+

[+] 正在检测,请稍后.....
[+] http://192.168.68.153:8080 | CVE-2019-0230 | CVE-2020-17530 |

问题:

若有问题或提示,欢迎提出!

struts2命令执行存在有回显和无回显,少数漏洞存在无回显,可以通过创建shell、反弹shell及dnslog测试漏洞的有效性。

若要命令执行,需要先指定漏洞编号(CVE),只有存在的漏洞才可以进行漏洞利用,更加明确。

因为目标环境存在多样性,产品不同、环境不同、特征不同,所以不能保证完全符合每个目标的特征情况,漏报是避免不了的。后期会通过更新,达到更佳的效果,欢迎诸位大佬提示,让脚本完善。

此次更新,漏洞并非特别完善,存在几个少数漏洞还未添入工具中,但绝大数以实现,后期若有新漏洞会积极跟进更新。

About

Struts2 full range of vulnerability scanning

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages