Sploitus

Exploit for Oracle-WebLogic

kitploit · 2026-08-25

Exploit Code

MARKDOWN65 lines
## https://sploitus.com/exploit?id=KITPLOIT:TOOLS-GITHUB-XHSECURITY-ORACLE-WEBLOGIC-CVE-2017-10271
# WebLogic Wls-wsat XMLDecoder

## 脆弱性の説明

mitre:https://vulners.com/cve/CVE-2017-3506

初期に、ハッカーはWebLogic WLSコンポーネントの脆弱性を利用して企業サーバーに対して大規模なリモート攻撃を仕掛け、多数の企業のサーバーが侵害されました。被害を受ける企業数は明らかに増加傾向にあり、高い注意が必要です。CVE-2017-3506は、Oracle WebLogicのWLSコンポーネントにおけるリモートコード実行の脆弱性であり、詳細が公開されていない野外利用の脆弱性です。多くの企業がまだパッチを適用していません。公式は2017年4月にこの脆弱性のパッチをリリースしました。

CVE-2017-3506のパッチ説明:

root@kitploit:~
    
    
    public WorkContextXmlInputAdapter(InputStream is)
      {
        ByteArrayOutputStream baos = new ByteArrayOutputStream();
        try
        {
          int next = 0;
          next = is.read();
          while (next != -1)
          {
            baos.write(next);
            next = is.read();
          }
        }
        catch (Exception e)
        {
          throw new IllegalStateException("Failed to get data from input stream", e);
        }
        validate(new ByteArrayInputStream(baos.toByteArray()));
        this.xmlDecoder = new XMLDecoder(new ByteArrayInputStream(baos.toByteArray()));
      }
      
      private void validate(InputStream is)
      {
        WebLogicSAXParserFactory factory = new WebLogicSAXParserFactory();
        try
        {
          SAXParser parser = factory.newSAXParser();
          parser.parse(is, new DefaultHandler()
          {
            public void startElement(String uri, String localName, String qName, Attributes attributes)
              throws SAXException
            {
              if (qName.equalsIgnoreCase("object")) {
                throw new IllegalStateException("Invalid context type: object");
              }
            }
          });
        }
        catch (ParserConfigurationException e)
        {
          throw new IllegalStateException("Parser Exception", e);
        }
        catch (SAXException e)
        {
          throw new IllegalStateException("Parser Exception", e);
        }
        catch (IOException e)
        {
          throw new IllegalStateException("Parser Exception", e);
        }
      }