mirror of
https://github.com/Medicean/VulApps.git
synced 2025-06-22 02:40:08 +00:00
(Add Vul: Struts2) S2-046
This commit is contained in:
parent
fa07240014
commit
0bb9fd3a76
63
_posts/2017-03-21-s_struts2_s2-046.md
Normal file
63
_posts/2017-03-21-s_struts2_s2-046.md
Normal file
@ -0,0 +1,63 @@
|
|||||||
|
---
|
||||||
|
layout: post
|
||||||
|
title: "Struts2 Jakarta 插件远程代码执行漏洞(S2-046)"
|
||||||
|
date: 2017-03-21 12:48:12 +0800
|
||||||
|
image: '/assets/img/'
|
||||||
|
description: 'Struts2 Jakarta 插件存在远程代码执行漏洞,攻击者只需发送一个精心构造的恶意请求,即可执行任意代码'
|
||||||
|
main-class: 'hole'
|
||||||
|
color: '#B31917'
|
||||||
|
tags:
|
||||||
|
- Struts2
|
||||||
|
- RCE
|
||||||
|
categories:
|
||||||
|
- Struts2
|
||||||
|
twitter_text: 'Struts2 Jakarta 插件存在远程代码执行漏洞,攻击者只需发送一个精心构造的恶意请求,即可执行任意代码'
|
||||||
|
introduction: 'Struts2 Jakarta 插件存在远程代码执行漏洞,攻击者只需发送一个精心构造的恶意请求,即可执行任意代码'
|
||||||
|
---
|
||||||
|
|
||||||
|
### 漏洞信息
|
||||||
|
|
||||||
|
* [S2-046 公告](https://cwiki.apache.org/confluence/display/WW/S2-046)
|
||||||
|
|
||||||
|
### 获取环境:
|
||||||
|
|
||||||
|
1. 拉取镜像到本地
|
||||||
|
```bash
|
||||||
|
$ docker pull medicean/vulapps:s_struts2_s2-046
|
||||||
|
```
|
||||||
|
|
||||||
|
2. 启动环境
|
||||||
|
```bash
|
||||||
|
$ docker run -d -p 80:8080 medicean/vulapps:s_struts2_s2-046
|
||||||
|
```
|
||||||
|
> `-p 80:8080` 前面的 80 代表物理机的端口,可随意指定。
|
||||||
|
|
||||||
|
### 使用与利用
|
||||||
|
|
||||||
|
访问 `http://你的 IP 地址:端口号/`
|
||||||
|
|
||||||
|
#### PoC
|
||||||
|
|
||||||
|
> 本例中使用 [Struts2_Jakarta_Plugin插件远程代码执行漏洞(S2-046) ](http://www.bugscan.net/source/plugin/4787/template/)
|
||||||
|
|
||||||
|
|
||||||
|
1.下载并安装 `BugScan SDK`
|
||||||
|
|
||||||
|
详见 [BugScan 插件开发文档 - 环境配置](http://doc.bugscan.net/chapter1/1-1.html)
|
||||||
|
|
||||||
|
2.修改 `poc.py` 中地址为容器地址
|
||||||
|
|
||||||
|
> 该漏洞无需配合上传表单使用
|
||||||
|
|
||||||
|
```python
|
||||||
|
if __name__ == '__main__':
|
||||||
|
from dummy import *
|
||||||
|
audit(assign(fingerprint.struts, 'http://127.0.0.1:8080/')[1])
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
|
3.运行 `poc.py`
|
||||||
|
|
||||||
|
```bash
|
||||||
|
$ python poc.py
|
||||||
|
```
|
Loading…
x
Reference in New Issue
Block a user