Web Server : Oracle WebLogic 10.35
Machine : Oracle Linux Server 3.8
I was able to partially exploit this CVE. I can execute any command on server using HTTP request and redirecting its output to a file i.e
cat /etc/passwd > /tmp/success
Then I use a legit endpoint of server to read /tmp/success . I can't establish a reverse shell. I tried different ways to establish it using java, bash, netcat but I think there is some kind of firewall on server, so I cant establish reverse shell. Any error on bash does not get redirected to file. Pings are successful but I cant make curl request and I dont get any type output of any error so I cant know what is the error.
If I cant get reverse shell then I want to upload a web shell, to access database but the problem is I am not familiar with Oracle and java. I found some files in subdirectories
/u01/app/oracle/product/Middleware/Weblogic1035/user_projects/domains/base_domain/
but these files contains encrypted passwords like
<jdbc-data-source xmlns="http://xmlns.oracle.com/weblogic/jdbc-data-source" xmlns:sec="http://xmlns.oracle.com/weblogic/security" xmlns:wls="http://xmlns.oracle.com/weblogic/security/wls" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.oracle.com/weblogic/jdbc-data-source http://xmlns.oracle.com/weblogic/jdbc-data-source/1.0/jdbc-data-source.xsd">
<name>mineDS</name>
<jdbc-driver-params>
<url>jdbc:oracle:thin:@172.23.1.88:1521:MINER</url>
<driver-name>oracle.jdbc.OracleDriver</driver-name>
<properties>
<property>
<name>user</name>
<value>admadmin</value>
</property>
</properties>
<password-encrypted>{AES}xMasyA7ZkGps2vmudMphn+Esp9wad4eJJGMm7A2Ebmo=</password-encrypted>
</jdbc-driver-params>
</jdbc-data-source>
Server has used ear file which I found in
/u01/app/oracle/product/Middleware/Weblogic1035/user_projects/domains/base_domain/servers/AdminServer/upload/XXX/app/XXX.ear
/u01/app/oracle/product/Middleware/Weblogic1035/user_projects/domains/base_domain/servers/AdminServer/upload/XXX/Plan.xml
How can I upload my own webshell with database connection?
Update
I found a way to upload web shell, by writing a jsp page in
/u01/app/oracle/product/Middleware/Weblogic1035/user_projects/domains/base_domain/servers/AdminServer/tmp/_WL_internal/bea_wls_internal/9j4dqk/war/
webshell works fine, only problem remains is how can I connect with database?