用Python编写带GUI界面的漏洞检测工具(Struts2)

朕终于在毕业前,摆脱了脚本小子的称号,在答辩老师面前顺利过关。凭借这朕的些许编程基础,终于做出了属于自己的一个脚本工具。

Struts2漏洞是一款经典的漏洞,Struts2框架曾爆出过很多高危漏洞。朕也是因为其经典的特性选择,此作为毕设的题目。

环境搭建

使用docker搭建靶场,这里需要用到一台kail主机。

  •   获取docker镜像           
[root@localhost ~]# docker pull 2d8ru/struts2
Using default tag: latest
Trying to pull repository docker.io/2d8ru/struts2 ... 
latest: Pulling from docker.io/2d8ru/struts2
40ae7ce86d93: Pull complete 
ef9ce992ffe4: Pull complete 
d0df8518230c: Pull complete 
63678957352b: Pull complete 
929e9da71fa4: Pull complete 
96ef2abace74: Pull complete 
ee465bb23abd: Pull complete 
7389ed23519a: Pull complete 
01dc7810fc78: Pull complete 
4afd531fccde: Pull complete 
0e8cb6ef92d5: Pull complete 
141c5a896ef9: Pull complete 
e1b65a5bf785: Pull complete 
f0cd1207fcb8: Pull complete 
ac0df1e10db5: Pull complete 
b4710c02ed19: Pull complete 
Digest: sha256:7aa386b4b606bec5f6a7f015bab6bd1cc84169beadb2a632b6939e6e703e47db
Status: Downloaded newer image for docker.io/2d8ru/struts2:latest

  • 启动docker镜像:
[root@localhost ~]# docker run -d -p 8080:8080 2d8ru/struts2
48cf32032f04db57430e44f930cf330fc347cfea948ba80adadf444df441ea2d 
[root@localhost ~]# docker ps 
  • 访问:

然后每个漏洞如下:

例如S2-045

就是IP:8080/S2-045

这样访问的

例如:

#所有的URL为
url = "http://192.168.43.131:23456/S2-005/example/HelloWorld.action"
url = "http://192.168.43.131:23456/S2-008/devmode.action"
url = "http://192.168.43.131:23456/S2-009/ajax/example5.action"
url = 'http://192.168.43.131:23456/S2-016/default.action'
url = "http://192.168.43.131:23456/S2-019/example/HelloWorld.action"
url = "http://192.168.43.131:23456/S2-032/memoshow.action"
url = "http://192.168.43.131:23456/S2-045/orders"

工具使用截图情况

这是朕的github地址:

https://github.com/hack-paidaxing/-GUI-Struts2-

总结:

  1. 此工具并没有采用到多线程与线程池的并发处理,后续会继续更新工具。
  2. python压缩成的exe太大了
  3. python做的工具不太稳定,后续学习java,尝试用java写脚本

  • 2
    点赞
  • 13
    收藏
    觉得还不错? 一键收藏
  • 2
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值