Sploitus

Exploit for Oracle-WebLogic

kitploit · 2026-08-25

Exploit Code

MARKDOWN65 lines
## https://sploitus.com/exploit?id=KITPLOIT:TOOLS-GITHUB-PETERPETER228-ORACLE-WEBLOGIC-CVE-2017-10271
# Oracle-WebLogic-CVE-2017-10271

WebLogic wls-wsat RCE CVE-2017-10271

## 脆弱性の説明

初期には、ハッカーが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);
        }
      }